# Discover if Domain Associated with Entra ID / Microsoft 365

## Overview

* We can check a particular Microsoft URL to determine if a domain is associated with Entra ID or Microsoft 365 (office)
* In the output, look for the `NameSpaceType` field and inspect the value:
  * `Managed` — domain is an Azure AD tenant
  * `Federated` — domain is associated with an Azure AD tenant but leverages a federation service e.g., Okta, PingID, Active Directory, etc.&#x20;
  * `Unknown` — domain not associated with Azure AD tenant

### View with Web Browser

<div data-with-frame="true"><figure><img src="https://2721275171-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8yu8YbDfwd1VqEdUxGyA%2Fuploads%2FSqxEZUQmdzIHllQZt5DK%2FCleanShot%202026-01-02%20at%2015.46.12%402x.png?alt=media&#x26;token=57244445-a359-42f2-936e-fbdfc6dec556" alt=""><figcaption></figcaption></figure></div>

### View with curl

{% code overflow="wrap" %}

```zsh
curl -s 'https://login.microsoftonline.com/getuserrealm.srf?login=<domain-url>&xml=1' | xmllint --format -
```

{% endcode %}

### View with PowerShell

{% embed url="<https://aadinternals.com/aadinternals/>" %}

{% code overflow="wrap" %}

```zsh
brew install powershell
```

{% endcode %}

```powershell
pwsh
Install-Module -Name AADInternals
Import-Module -Name AADInternals
Get-AADIntLoginInformation -Domain <domain-url>
```

***

## Additional Resources

{% embed url="<https://learn.microsoft.com/en-us/archive/blogs/tip_of_the_day/cloud-tip-of-the-day-advanced-way-to-check-domain-availability-for-office-365-and-azure>" %}
