{"id":8691,"date":"2022-03-23T19:09:36","date_gmt":"2022-03-23T19:09:36","guid":{"rendered":"https:\/\/blogs.aaddevsup.xyz\/?p=8691"},"modified":"2022-03-23T19:09:42","modified_gmt":"2022-03-23T19:09:42","slug":"users-unable-to-lookup-other-users-in-the-ms-graph-users-endpoint","status":"publish","type":"post","link":"https:\/\/blogs.aaddevsup.xyz\/2022\/03\/users-unable-to-lookup-other-users-in-the-ms-graph-users-endpoint\/","title":{"rendered":"Users unable to lookup other users in the MS Graph Users endpoint"},"content":{"rendered":"\n
The Microsoft Graph endpoint is how you can interact programmatically with your tenant data. One of the most common scenarios is a MS Graph request to look up a user or users in the tenant. If you’re using delegated permissions in your access token, for a user to look up another user, the access token will need the delegated permission of User.Read.All However, there are ways to prevent users from being able to lookup other users in MS Graph via a tenant policy unless the user is a tenant admin. This sometimes is a gotcha because you may implement this policy in the tenant but later on, a new application needs to be able to perform this action and it is getting a 401 response, even though the proper permissions are consented to on the app registration and the access token has the proper permission. And, you have forgotten that this policy was enabled but it works for admin users. This is your clue that there is a policy in place preventing normal users from querying users.<\/p>\n\n\n\n