Skip to main content

Accepted domains without DKIM signing turned on

Which of our accepted domains in Exchange Online don't have DKIM signing turned on?

Exchange OnlinePowerShell 7.6 Read-only
Cmdlet lint
Passed
23 Nov 2026
Changes anything
No
Read-only
Pinned versions
2

Script

exchange-accepted-domains-without-dkim.ps1
#Requires -Modules ExchangeOnlineManagement
# Accepted domains whose DKIM signing configuration is missing or not enabled. Read-only.
param(
    [switch]$All
)

Connect-ExchangeOnline -ShowBanner:$false

# One call for every DKIM configuration, keyed by domain name (Name). Get-DkimSigningConfig -Identity
# returns every configuration when the domain has none, so it isn't used per domain.
$dkimByDomain = @{}
Get-DkimSigningConfig | ForEach-Object { $dkimByDomain["$($_.Name)".ToLowerInvariant()] = $_ }

Get-AcceptedDomain -ResultSize Unlimited |
    ForEach-Object {
        $domain = "$($_.DomainName)"
        $dkim = $dkimByDomain[$domain.ToLowerInvariant()]
        [pscustomobject]@{
            Domain     = $domain
            DomainType = "$($_.DomainType)"
            Enabled    = if ($dkim) { [bool]$dkim.Enabled } else { $null }
            Status     = if ($dkim) { "$($dkim.Status)" } else { 'No DKIM signing configuration' }
        }
    } |
    Where-Object { $All -or $_.Enabled -ne $true } |
    Sort-Object 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

  • Lists each accepted domain that has no DKIM signing configuration, or one with Enabled set to False, with its DomainType and the configuration's Status. Pass -All to list every accepted domain.
  • Per Microsoft, outbound mail from a custom domain isn't DKIM signed with that domain until you configure DKIM for it. A Status of CnameMissing means the domain's DKIM CNAME records haven't been detected yet.
  • Per Microsoft, mail from the initial *.onmicrosoft.com domain is DKIM signed automatically, and that domain typically doesn't appear in Get-DkimSigningConfig output unless you configured it yourself. It can show here as having no configuration even though its mail is signed.
  • The script reads Exchange Online settings only. It doesn't look up the CNAME records in DNS.
  • ExchangeOnlineManagement 3.10.0 and later require PowerShell 7.6 when run in PowerShell 7 (Windows PowerShell 5.1 is unaffected), per the module release notes.

Sources

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

All scripts