Are you using Azure AD Graph or Microsoft Graph. Both of these have /me endpoints that you can use to get current signed in user. From your question it is not clear which Graph you are using. Please comment with more info. But the links attached have docs for getting current signed in user.
How can I get the currently logged in user by Graph API
Jack Zhang
1
Reputation point
How can I get the currently logged in user by Graph API
Microsoft Security | Microsoft Entra | Microsoft Entra ID
25,180 questions
2 answers
Sort by: Most helpful
-
Danstan Onyango 3,906 Reputation points Microsoft Employee
2021-03-10T08:20:42.437+00:00 -
Khurram Rahim 1,851 Reputation points Volunteer Moderator
2023-02-08T19:24:50.1033333+00:00 You can retrieve the currently logged in user information using the Microsoft Graph API by sending a GET request to the following endpoint:
bash
Copy code
https://graph.microsoft.com/v1.0/me
You'll need to include an access token in the authorization header of the request, which you can obtain using the OAuth 2.0 authorization flow.
Here's an example using cURL:
css
Copy code
curl --location --request GET 'https://graph.microsoft.com/v1.0/me' \
--header 'Authorization: Bearer <ACCESS_TOKEN>'
Replace <ACCESS_TOKEN> with a valid access token.