question

admin-5738 avatar image
0 Votes"
admin-5738 asked saldana-msft edited

Azure Application - Listing Installed TenantIds

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

azure-active-directorymicrosoft-graph-sdk
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MarileeTurscak-MSFT avatar image
0 Votes"
MarileeTurscak-MSFT answered admin-5738 commented

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://docs.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.


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for your answer!
I appologize for not using the right terminology, I'll try to clearify using common concepts:

I am developing an AAD "offline" application which would be distributed to clients.
I want to get some data about the organizations that installed my application, say List oauth2PermissionGrants: https://docs.microsoft.com/en-us/graph/api/serviceprincipal-list-oauth2permissiongrants?view=graph-rest-1.0&tabs=http.

to use the API i need the tenantId (which i understand as a sort of installation-id that / client-organization-id).
How could i list these Ids for all my clients in order to get their insformation?

0 Votes 0 ·