Azure Application - Listing Installed TenantIds

admin 6 Reputation points
2021-10-18T07:21:17.347+00:00

Hey,
Is it possible (via Graph \ other way) to get a list of installed tenantIds for my application?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,592 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,473 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Marilee Turscak-MSFT 33,801 Reputation points Microsoft Employee
    2021-10-18T19:12:42.617+00:00

    You can list all applications under a tenant using Get-AzADApplication, and you can find the tenant ID under which an application is registered by checking the app registration in the portal. I'm not sure exactly what you mean by "installed", but if you are looking for a way to find associated tenants, I don't believe there is a command for that.

    To list the tenants for your account, you can use:

    GET https://management.azure.com/tenants?api-version=2020-01-01  
    

    https://learn.microsoft.com/en-us/rest/api/resources/tenants/list

    If you want to see the tenant ID associated with an app registration, you can do so through the portal under Azure Active Directory > App Registrations > the app registration > Overview. I don't believe it's possible to get this data via Powershell since Powershell requires both Tenant ID and Application ID to query the application information.

    If you provide more details about your use case, I'm happy to bring this up with the product team.

    See related thread.