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

--

--

--

Principal Engineer / Architect, FastTrack for Azure at Microsoft

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

I made a website to make my job easier

Alvin’s Dew Drop Daily — Issue #14

Product Update Sep.19.2021: Go / Golang Suggested Comments

Fallacy Of Distributed Computing

Open Source Software: Hacktober Fest

Logging for ML Systems

How to make a HTML5 Flipbook for Free! [Easy Tutorial]

Manoj Joins as the Scrum Master of Zomato

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
Arsen Vladimirskiy

Arsen Vladimirskiy

Principal Engineer / Architect, FastTrack for Azure at Microsoft

More from Medium

Developing a File Sharing Platform using Azure! (PRACTICAL)

DevOps for Azure Logic Apps Standard

Azure Sphere

Unable to switch directories in Azure AD