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

3

10

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.

Yorke answered 9/7, 2014 at 7:54 Comment(0)
D
7

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.

Dacron answered 24/7, 2014 at 17:6 Comment(2)
I did this. But still facing the same issue. Can you suggest any other troubleshooting steps too?Precedency
Same here - also posted here about our similar issue #42693459Coppola
I
1

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"

Iguanodon answered 9/3, 2016 at 16:43 Comment(0)
H
0

The consent framework associated with requesting authorization requires that your client application is configured with a static set of permissions to the resources (APIs) that it will call. For example, if your app needs to read the signed in user's mail and read and write to their calendar, you need to select Office 365 Exchange Online as a resource and pick the Read mail and Read and write calendar permissions. This app configuration can be done in a couple of ways - one way is through your dev environment - like Visual Studio. VS2013 and up have a connector that allows you to register a client app and configure its access to O365 cloud resources. Another way is through the Azure Management Portal (under the AD extension, find your application, click on the configure tab, and configure access through the "permissions to other applications" section. I recommend that you look through https://msdn.microsoft.com/en-us/office/office365/howto/common-app-authentication-tasks and the following sections which show how register apps through Azure Management Portal and through Visual Studio. Also which sample are you trying here? The sample should contain instructions, including the instructions to set the resource and permission scopes your application needs

Hockenberry answered 15/5, 2015 at 17:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.