Search code examples
azureazure-management-api

Retrieving all the users in an Azure subscription


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.


Solution

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

    Removing the user from Azure subscription programtically(C#)