0
votes

We have lot of references in the web to fetch the all AAD users but i need to fetch all the users from an Azure subscription.

I have created an App in Azure active directory and added that App to the Subscription then used ClinetId and Client secret to create the AuthToken. Used the created auth token to hit the below REST API(an Azure resource management REST API)

https://management.azure.com/subscriptions/{my subscription id}/resourceGroups/{My resource group name}/providers/Microsoft.ApiManagement/service/{my Azure managment API Name}/users?api-version=2018-01-01

But this rest API is retrieving only one User, which is mine.

Here i want to retrieve all the users in a subscription.

Here is the MSDN url i used as reference.

Please can any one help me on this.

2
I am unsure is this issue is because i am using the Free Subscription.. Please can any one help me on thisAvinash
Hi, Below URL is fetching the list of Users in a Subscription. docs.microsoft.com/en-us/azure/role-based-access-control/… But this URL is fetching only User GUID. But i want all the information of a User. Please can any one help me in getting all the information of all the users.Avinash
You can find the answer for this question in below thread. stackoverflow.com/questions/51093012/…Avinash

2 Answers

0
votes

It is not because of the free sub.

Does your app have the permission to the Graph API (to read users)? If you try the same user via PS console and you get the same output then its not your code but permissions (Good read on PS https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-powershell-1.0/ff730967(v=technet.10) ).

On the graph api here https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-graph-api-quickstart

0
votes

You can find the answer for this question in below thread.

Removing the user from Azure subscription programtically(C#)