Tricks for Determining the Tenant ID from an AAD Domain

In my previous post Useful URL for Determining the Domain Type, I introduced a URL that facilitates the swift identification of the AAD domain type based on the provided AAD domain name. Additionally, there are instances where it becomes necessary to ascertain the precise tenant ID associated with a given domain.

For this purpose, you can employ the following URL as a useful technique to promptly uncover the corresponding tenant ID.

https://login.microsoftonline.com/<domainName>/v2.0/.well-known/openid-configuration

Substitute <domainName> with the domain name you wish to inquire about.

As demonstrated below, the tenant ID is disclosed in the server response: