I have a customer who is using a liveID account to manage 20+ different Azure AD directories.
How can I get a list of all the Azure AD instances associated with th
How can I get a list of all the Azure AD instances associated with this account?
I am not sure whether Microsoft Graph api expose the api call to get a list of all the Azure AD instances associated with this account . But i noticed in azure new portal , i could choose Multiple Windows Azure Active Directories by clicking my user name on top right part of portal . Use Fiddler you could find api call which portal use to get multiple Windows Azure Active Directories information :
https://ms.portal.azure.com/AzureHubs/api/tenants/List
Then you could add Windows Azure Service Management API
in required permissions
in your app :
Then using authorization code flow , you need to get access token for Windows Azure Service Management API
by setting resource :https://management.core.windows.net/
.
After you get the access token , you could try below api calls to get all the Azure Active Directories :
POST https://ms.portal.azure.com/AzureHubs/api/tenants/List
Authorization: Bearer xxxxx
The result :
If your account is a microsft account and want to authenticate with app , you could add the account as external user in AAD .