Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The client application has requested access to resource 'https://outlook.office365.com'. This request has failed

I am trying to test the sample code from office365 API, I could login to my account but after that i would always get this exception


AuthenticationFailedException was caught

AADSTS65005: The client application has requested access to resource 'https://outlook.office365.com'. This request has failed because the client has not specified this resource in its requiredResourceAccess list.

Trace ID: 7a39b0bd-1738-418f-984a-feffae5b5d9b

Correlation ID: 16da7c7f-9f0c-468f-a560-a51b1ac9b3bf

Timestamp: 2014-07-09 07:36:34Z


This is the code that I have been testing this code is generated by the API.

Authenticator authenticator = new Authenticator(); var authInfo = await authenticator.AuthenticateAsync("https://outlook.office365.com");

please help me or point-out what I'm doing wrong, this is my first time developing in office365 please help and thank you.

like image 211
user2342194 Avatar asked Jul 09 '14 07:07

user2342194


2 Answers

I just came across your question having run into the same error, so since nobody ever answered I figured I would post the answer I found. This error is related to the permissions set to be requested on the app in the Azure dashboard at https://manage.windowsazure.com.

If you go into your app configuration page and scroll to the bottom, you just need to add the corresponding items under the delegated permissions dropdown.

like image 180
theark40 Avatar answered Oct 19 '22 13:10

theark40


I got the same error. This is what fixed it for me:

  1. Go to https://manage.windowsazure.com

  2. Go to the corresponding app configuration page.

  3. Scroll to the bottom to "permissions to other applications".

  4. Add "Windows Azure Active Directory" application if it is not already there.

  5. Under delegated permissions check "Enabled Sign-on and read user's profiles"

like image 23
Adam Franicsco Avatar answered Oct 19 '22 12:10

Adam Franicsco