Getting list of Azure subscriptions of customers who deployed your Azure Managed Application

“Managed application center” in Azure Portal

Search for “Managed applications center” in Azure Portal
Marketplace applications in Managed applications center
Managed applications list

Programmatically list customers’ Azure subscription and AAD tenant ids

az rest --url https://management.azure.com/subscriptions?api-version=2020-01-01 -o json
Response from ARM /subscriptions API
az account list --query "[?managedByTenants[?tenantId=='<<PUBLISHER_TENANT_ID>>']][id]" -o tsv --all

Programmatically list Azure Managed Applications

Developer Tools showing call that “Managed applications center” makes to get list of subscription ids
Azure Resource Graph query from Managed applications center
az graph query --graph-query "resources | where type =~ 'Microsoft.Solutions/applications'|where isnotempty(plan.publisher)| where properties.publisherTenantId == 'dd74924a-88ce-421a-ac87-00fc9dbe4baf' | summarize count(), tenantIds=makeset(tenantId, 1000), any(tostring(plan.name)) , managedResourceGroupIds=makeset(properties.managedResourceGroupId, 5000) by tostring(plan.product), tostring(plan.publisher), subscriptionId" --subscriptions xxxxx1, xxxxx2 -o json
Azure Resource Graph query response showing deployed managed application

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store