Azure Monitor: List all resource groups with their subscription

Login portal.azure.com , click on Resources Graph and run this query:

resourcecontainers | where type == 'microsoft.resources/subscriptions/resourcegroups' | project name, id,subscriptionId,tags |project-rename rg_name=name,rg_id=id,rg_tags=tags | join kind=inner ( resourcecontainers | where type == 'microsoft.resources/subscriptions' | project name,subscriptionId,tenantId,tags | project-rename sub_tags=tags ) on subscriptionId

Leave a Reply

Your email address will not be published. Required fields are marked *