Get all users across all tenants using microsoft graph API

muthuvel 31 Reputation points
2020-09-01T15:58:23.36+00:00

While doing oauth, I have passed tenant as common. Using that access_token, called users graph API.
This API returned the default tenant users only. I have custom tenant also.

I want to list the all users across all tenants.

is it possible to get the all users in same endpoint / same access_token ?

Ref: https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow#request-an-authorization-code

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,454 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Saurabh Sharma 23,671 Reputation points Microsoft Employee
    2020-09-01T20:17:52.287+00:00

    @muthuvel No, it is not possible to use the same access token to list all users across different tenants as tokens are tenant specific. Also, your application will know the tenant information only when you login so, if user 1 from tenant A signs in, you will always get the users from tenant A.

    1 person found this answer helpful.