Skip to main content
KBY Technologies Logo

Tenant domains: verified, federated and default

Which domains does the tenant hold, which are verified, which sign in through federation, and which one is the default?

Microsoft Entra IDPowerShell 7.6 Read-only
Cmdlet lint
Passed
4 Dec 2026
Changes anything
No
Read-only
Pinned versions
3

Script

entra-tenant-domains.ps1
#Requires -Modules Microsoft.Graph.Authentication, Microsoft.Graph.Identity.DirectoryManagement
# Domains in the tenant with verification, authentication type and default flags. Read-only.
param(
    [switch]$UnverifiedOnly
)

Connect-MgGraph -Scopes 'Domain.Read.All' -NoWelcome

$domains = Get-MgDomain -All
if ($UnverifiedOnly) {
    $domains = $domains | Where-Object { -not $_.IsVerified }
}

$domains |
    ForEach-Object {
        [pscustomobject]@{
            Domain             = $_.Id
            AuthenticationType = $_.AuthenticationType
            IsDefault          = $_.IsDefault
            IsInitial          = $_.IsInitial
            IsVerified         = $_.IsVerified
            IsRoot             = $_.IsRoot
            IsAdminManaged     = $_.IsAdminManaged
            SupportedServices  = $_.SupportedServices -join ', '
        }
    } |
    Sort-Object @{ Expression = 'IsDefault'; Descending = $true }, Domain

Checked automatically against Microsoft's published cmdlet reference. KBY hasn't run it in your tenant; run it in a test environment first.

Reading the output

  • One row per domain. IsDefault marks the domain used for new users, and there is only one. IsInitial marks the initial domain Microsoft Online Services created for the tenant.
  • AuthenticationType is Managed when Microsoft Entra ID performs user authentication, or Federated when sign-in goes to an identity provider such as AD FS.
  • IsVerified is false while domain ownership has not been proved with a DNS record. Pass -UnverifiedOnly to list just those domains.
  • SupportedServices lists the capabilities Microsoft documents for the domain, such as Email. The output leaves out the DNS records, the federation settings and the users that reference each domain.

Sources

The Microsoft reference page for every cmdlet the script calls, plus the API and product pages behind each permission and caveat.

Found this useful? Follow KBY for more like it.

More from KBY that goes with this script.

All scripts