0
votes

i am trying to do azure active directory login using spa and webapi

by following the source code in the link

https://github.com/Azure-Samples/active-directory-angularjs-singlepageapp-dotnet-webapi/issues/30

but i am geting following message as response

Request Id: f106b5ad-6392-4c41-8fa2-473629870700 Correlation Id: 6abe676b-e3d0-41e2-8255-829dff79b6b0 Timestamp: 2018-04-12T07:52:15Z Message: AADSTS65005: Invalid resource. The client has requested access to a resource which is not listed in the requested permissions in the client's application registration. Client app ID: 8f4b3482-68c1-42b1-b4dd-ea1e0ad9a65e. Resource value from request: . Resource app ID: 00000002-0000-0000-c000-000000000000. List of valid resources from app registration: c7aee132-6d62-4d80-9511-057c9420fd2b.

1

1 Answers

5
votes

The error indicates that your client code is asking the STS to give you tokens which grant access to Azure Active Directory Graph (Resource app ID: 00000002-0000-0000-c000-000000000000), but your app registration in the Azure Portal only lists another appID (c7aee132-6d62-4d80-9511-057c9420fd2b).

You can get access to call Azure Active Directory Graph if you follow the instructions here.