How can I use MS Graph to list Azure AD instances for a given LiveID account?

前端 未结 1 613
耶瑟儿~
耶瑟儿~ 2021-01-15 11:30

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

相关标签:
1条回答
  • 2021-01-15 11:58

    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 .

    0 讨论(0)
提交回复
热议问题