You are obtaining a token via the confidential client flow, meaning you not running in the context of a user. Thus you should not be using the /me endpoint, but /users/objectID one.
Or obtain a token via some of the delegate permissions flows.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi, I am new to azure counting only on the ongoing project experience. To give a background about the issue that I am facing with Azure active directory is,I have to implement authentication/authorization for my application that will be hosted on Public cloud but will be accessible to users from a particular domain only(single tenant).
Attachment includes code that I have written to get the logged in User details. when trying to run the application,below is the error that I am getting:
{ "error": { "code": "Request_ResourceNotFound", "message": "Resource '4420a373-e920-4294-b479-750d6a1845c5' does not exist or one of its queried reference-property objects are not present.", "innerError": { "request-id": "4ad3af1d-e063-4863-806c-6fc28ee8e0bc", "date": "2019-12-14T08:09:53" } } }
I have cross verified :
1- ClientId,SecretId,TenantId of my application given in the code
2- The token that I am getting through the code using jwt.io.
3- My User name is already there in the Azure Active directory as well.
4- Read User profile scope is granted to my account
When trying to access the api from Graph explorer using https://graph.microsoft.com/v1.0/me/ I am able to access my details.
But when trying to run this to code,I get below error.
Any help would be appreciated on this.
Regards.
Hi
You are obtaining a token via the confidential client flow, meaning you not running in the context of a user. Thus you should not be using the /me endpoint, but /users/objectID one.
Or obtain a token via some of the delegate permissions flows.