Lookup external tenant id (notes)
Requirements: Authorization header and CrossTenantInformation.ReadBasic.All permission on App Registration.
Use case
Graph API
GET https://graph.microsoft.com/beta/tenantRelationships/findTenantInformationByDomainName(domainName='<domain>')
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#microsoft.graph.tenantInformation",
"tenantId": "<tenantid>",
"federationBrandName": null,
"displayName": "<tenantdisplayname>",
"defaultDomainName": "<tenantonmicrosoftdomainname>"
}