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

Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
12,705 questions
1 vote

1 answer

Sort by: Most helpful
  1. Saurabh Sharma 17,291 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.