question

muthuvel-3168 avatar image
0 Votes"
muthuvel-3168 asked MunazzaOsama-2843 commented

Get all users across all tenants using microsoft graph API

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://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow#request-an-authorization-code

azure-ad-graphazure-ad-tenant
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, are there any updates with this case? If not, please select the appropriate response as "Answered." Otherwise please let us know how we can assist you.

0 Votes 0 ·

1 Answer

SaurabhSharma-msft avatar image
1 Vote"
SaurabhSharma-msft answered MunazzaOsama-2843 commented

@muthuvel-3168 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.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@muthuvel-3168 Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.

0 Votes 0 ·

so what is the purpose of using "common" end point?

and what if we want to create users from different tenants? same access token will work?

0 Votes 0 ·