Currently you can get the tenant id for a given domain associated with a 365 tenant by using the GET response of https://login.microsoftonline.com/{domainname}/.well-known/openid-configuration
However, I haven't been able to find a way to take a given tenant id and get the domain(s) associated with that tenant. Is there a way to get at least the primary domain for a given tenant?
This is assuming no existing partner/reseller relationship with the given tenant, so AFAICT I can't use the id for managed tenants at https://learn.microsoft.com/en-us/graph/api/managedtenants-tenant-get?view=graph-rest-beta&tabs=http
I've tried https://login.microsoftonline.com/{tenant-id}/.well-known/openid-configuration and that gives a response, but nothing seems to include any of the tenant domains nor does it seem to include any pointers to urls that would return it AFAICT.
I'm using organization endpoint
It returns tenant id and verified domains
Another option is to use findTenantInformationByTenantId
Response