# Lookup external tenant id

<p class="callout info">Requirements: Authorization header and CrossTenantInformation.ReadBasic.All permission on App Registration. </p>

With this API endpoint you can check if the domain is registered on Microsoft 65 products and get the tenant name and tenant id by a random domain name.

### Use case

This API can be used to lookup a domain name to check if this company or domain is using Microsoft 365.

### Graph API

This API route can be used to lookup the tenant id and tenant name.

GET https://graph.microsoft.com/beta/tenantRelationships/findTenantInformationByDomainName(domainName='&lt;domain&gt;')

```json
{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#microsoft.graph.tenantInformation",
    "tenantId": "<tenantid>",
    "federationBrandName": null,
    "displayName": "<tenantdisplayname>",
    "defaultDomainName": "<tenantonmicrosoftdomainname>"
}
```

Response: 200 OK

If the domain is not registered inside Microsoft 365, this API route returns a 404 Error.