Search code examples
azureazure-active-directoryazure-subscription

Azure AD application - List subscription with role assignment


I'm new to Azure. I created an Azure AD application and gave it reader role assignments in several subscriptions - and I want to list those subscriptions dynamically

I need an API to list all the subscriptions which my application has a role assignment on, but I can't find a way to do it. any ideas?

Thanks!


Solution

  • You can use below REST API method to list the subscriptions

    GET https://management.azure.com/subscriptions?api-version=2020-01-01
    

    Reference: Subscriptions - List - REST API (Azure Resource Management) | Microsoft Docs