Microsoft Graph Api-Unable to get logged in user details

Farhin S. Shaikh 21 Reputation points

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).

link text

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

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 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.



Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
14,746 questions
0 comments No comments
{count} votes

Accepted answer
  1. Vasil Michev 71,216 Reputation points MVP

    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.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful