Share via

User.ReadBasic.All when using any organizational directory and personal account

Jon Harper 0 Reputation points
2024-07-10T09:15:19.9966667+00:00

Hi, when using the /common oauth2 endpoint (any organization or personal account) to log in users,

is it possible to fetch the firstname/lastname of other users that have used my application? I can get the name of the current logged in user from the openidconnect userinfo endpoint. But when I try to request the User.ReadBasic.All scope, the returned token doesn't contain it. And When I call the graph API,

GET https://graph.microsoft.com/v1.0/users/XXXX

it only returns information about the currently logged in user no matter what user id id I use in the path.

What is the recommended approach to show to my users the names of the other users that have used my app ? A workaround is to always copy the information of the logged in user one user at a time, but this feels like a bad practice.

Microsoft Security | Microsoft Graph

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.