DMARC for Microsoft 365: Complete Setup Guide (SPF, DKIM CNAME Delegation, Defender Portal, Feb 2024 Bulk-Sender Requirements)
The operator deployment guide for DMARC on a Microsoft 365 / Exchange Online tenant. Covers all five rollout phases - SPF with include:spf.protection.outlook.com, DKIM via the Defender portal with CNAME delegation (selector1 and selector2 pointing at <tenant>.onmicrosoft.com), DMARC at p=none with rua reporting, alignment fix-up for the onmicrosoft.com signing pattern and SaaS senders, and advancement through p=quarantine to p=reject with Defender for Office 365 Trusted ARC Sealers. Anchored against the Feb 2024 Google/Yahoo bulk-sender requirements that apply to every sender regardless of mailbox provider.
This deployment guide is provided in English. Microsoft 365 Defender portal UI labels (Email & Collaboration > Policies & rules > Threat policies > Email authentication settings > DKIM, security.microsoft.com) and DNS-record syntax (v=spf1 include:spf.protection.outlook.com -all, selector1._domainkey CNAME, Set-DkimSigningConfig) do not translate. We keep the body in the source language so technical terms remain consistent with the Microsoft documentation and the underlying RFCs.
TL;DR
- Microsoft 365 senders
need three DNS records: SPF
with
include:spf.protection.outlook.com, DKIM as two CNAME records atselector1._domainkeyandselector2._domainkeypointing at your tenant's<tenant>.onmicrosoft.comkey infrastructure, and DMARC at_dmarc.<your-domain>starting atp=none. - Google's Feb 2024 bulk-sender
requirements apply to M365 senders
too: SPF + DKIM alignment, DMARC at minimum
p=none(bulk senders strongly encouraged atp=quarantineor stronger), RFC 8058 one-click List-Unsubscribe, and spam-complaint rate under 0.3% for any domain sending >5000 messages/day to gmail.com or yahoo.com. Yahoo signed jointly with Google. - SPF record:
v=spf1 include:spf.protection.outlook.com ~allduring rollout, harden to-allin production. Add additionalinclude:for every third-party sender (SendGrid, Mailchimp, on-premises Exchange) - stay under the 10-DNS-lookup limit. - DKIM workflow: Microsoft 365
Defender portal > Email &
Collaboration > Policies & rules >
Threat policies > Email authentication
settings > DKIM. Publish the two
CNAMEs the portal displays for selector1
and selector2, wait 24-48h for DNS
propagation, then enable signing for the
custom domain (UI toggle or
Set-DkimSigningConfig -Identity your-domain.com -Enabled $truevia Exchange Online PowerShell). - The #1 M365 failure mode:
mail signed under
<tenant>.onmicrosoft.cominstead of your custom domain. Cause: DKIM was never enabled for the custom accepted domain after CNAME publication. Fix: publish CNAMEs, wait for propagation, then enable. DMARC fails until DKIM signs under the aligned visible-From: domain. - DMARC rollout:
v=DMARC1; p=none; rua=mailto:dmarc-reports@your-domain.comfirst. Ingest reports for 2-6 weeks to inventory every sender. Advance top=quarantineonly after every legitimate sender is aligned. Never skip fromp=nonetop=reject. - Defender for Office 365 Trusted ARC Sealers (security.microsoft.com > Email & Collaboration > Policies & rules > Threat policies > Email authentication settings > ARC) lets Exchange Online trust ARC signatures from specific intermediaries (Proofpoint, Mimecast, Cisco IronPort) so DMARC survives forwarding through security gateways. Configure each intermediary explicitly.
- DMARC Analyzer ingests
Microsoft's daily aggregate reports via
includes/DmarcParser.phpand surfaces the per-sender / per-IP / per-day breakdown that drives the alignment fix-up phase.
1. What this guide covers
This is the operator-implementation walkthrough for deploying SPF, DKIM, and DMARC on a domain whose mail is sent by Microsoft 365 / Exchange Online (formerly Office 365). It assumes you are the administrator of an M365 tenant and have access to:
- The Microsoft 365 Defender portal at security.microsoft.com - the modern location for the DKIM and ARC management UI. Used to display the CNAME records for each custom accepted domain and to enable DKIM signing once the CNAMEs resolve.
- Optional but recommended: the Exchange
Online PowerShell module for
scripted DKIM configuration via
Set-DkimSigningConfigand related cmdlets (faster than the UI for bulk operations across many accepted domains). - Your domain's DNS provider (Cloudflare, Route 53, GoDaddy, etc.) - used to publish the SPF, DKIM CNAMEs, and DMARC TXT records.
- A working email mailbox on the domain to receive DMARC aggregate reports (or a third-party report-ingestion service - DMARC Analyzer is one option).
The guide is structured as five sequential deployment steps (SPF → DKIM → DMARC at p=none → alignment fix-up → enforcement) that mirror the canonical DMARC rollout with Microsoft-365-specific UI paths, syntax, and gotchas.
What this guide does not cover:
- On-premises Exchange Server - a separate product with its own DKIM story (typically via an external signer like Exchange Transport Rules + a third-party plugin). The CNAME-based DKIM workflow documented here is specific to Exchange Online / M365.
- Hybrid Exchange setups where mail flow splits between on-premises and Exchange Online - the DKIM strategy depends on which side handles outbound; if Exchange Online is the outbound boundary the M365 setup below applies, otherwise the on-premises signer governs.
- Microsoft 365 Defender's other anti-phishing features (anti-spoof policy, impersonation protection, Safe Links / Safe Attachments) - all valuable but separate from DMARC.
2. Why DMARC matters now: the Feb 2024 bulk-sender requirements
In February 2024 Google (jointly with Yahoo) introduced sender requirements that apply to any domain sending more than 5000 messages per day to gmail.com or yahoo.com combined - regardless of which mailbox provider sends the mail. The Feb 2024 cutover is the single largest DMARC-adoption driver in the industry to date and the proximate reason most M365 administrators are revisiting email authentication in 2024-2025. Microsoft publishes its own sender-best-practices but has not (as of this writing) introduced its own bulk-sender enforcement scheme - the Google/Yahoo requirements remain the industry-wide forcing function.
The five Feb 2024 requirements:
- SPF must be set up and pass for the sending domain (RFC 7208).
- DKIM must be set up and pass (RFC 6376). The domain in the visible From: header must also align with either the SPF domain or the DKIM domain — that is what DMARC identifier alignment requires; aligning both is good practice.
- DMARC TXT record published
with at minimum
p=none- and bulk senders are strongly encouraged to advance top=quarantineorp=rejectover time. - RFC 8058 one-click
List-Unsubscribe
(
List-Unsubscribe-Postheader +List-Unsubscribewith both amailto:and anhttps:URL) on every commercial / marketing message. - Spam complaint rate < 0.3% as measured at the receiver (with anything >0.1% as a yellow flag). Microsoft's equivalent telemetry is the Microsoft 365 Defender Email entity view; Google's equivalent is Postmaster Tools.
Bulk senders that fail one or more requirements have their mail delivered to spam at Gmail and Yahoo, or rejected entirely at the SMTP boundary. The 5000-messages-per-day threshold catches every commercial mailing-list operator, most B2B SaaS senders, and any organisation running marketing automation against the consumer-mailbox segment - regardless of whether their mail flows through M365, Workspace, or a self-hosted MTA.
Even non-bulk senders below the 5000 threshold should publish DMARC for two reasons:
- Spoofing protection. Without DMARC, attackers can forge messages with your domain in the From: header from anywhere on the internet. Microsoft's own SPF / DKIM on your outbound mail does nothing to stop a different sender at a different IP from spoofing your domain at another receiver. DMARC at enforcement is what closes that gap.
- Threshold drift. The 5000/day cutoff is the threshold today; Google's stated direction is universal enforcement. Deploying DMARC at p=quarantine now means you are not exposed when the threshold drops.
3. Prerequisites
- Microsoft 365 Global Administrator role, or one of the more-scoped admin roles that grants access to the Defender portal's Email authentication settings page (Security Administrator, Exchange Administrator). Required to view the CNAME records for each accepted domain and to toggle DKIM signing on/off.
- DNS edit access for the
primary accepted domain. You will publish
three records minimum: SPF TXT at apex,
two DKIM CNAMEs at
selector1._domainkeyandselector2._domainkey, and a DMARC TXT at_dmarc. - The custom domain registered as an accepted domain in the M365 tenant. The Defender portal's DKIM page will display "Status: Not configured" and the two CNAMEs to publish for each accepted domain. Domains that are not registered accepted domains do not appear.
- A monitored mailbox on
the domain (or a third-party DMARC report
ingestion service such as DMARC Analyzer).
Reports arrive as gzip-compressed XML
attachments - a typical setup uses a
dedicated address like
dmarc-reports@your-domain.com. - Inventory of every legitimate sender for the domain. M365 is the obvious source, but the list usually also includes a marketing platform (Mailchimp, Klaviyo, Customer.io), a transactional relay (SendGrid, Mailgun, Amazon SES, Postmark), a CRM (Salesforce, HubSpot, Dynamics 365), helpdesk software (Zendesk, Intercom), on-premises servers relaying via M365 Direct Send, and potentially shadow-IT senders only the reports will surface.
4. Step 1: Configure SPF with spf.protection.outlook.com
Publish a single SPF TXT record at the domain
apex (the root of your zone). Microsoft 365
publishes its sender IPs at
spf.protection.outlook.com - a
nested include that resolves to the union of
every Exchange-Online-side mail source
(Exchange Online Protection outbound, M365
Direct Send, Microsoft 365 Group mail, etc.).
Microsoft updates the underlying IPs without
operator intervention.
Minimum record for an M365-only sender:
your-domain.com. IN TXT "v=spf1 include:spf.protection.outlook.com ~all"
Production record once SPF passes are clean
(note the -all hard fail):
your-domain.com. IN TXT "v=spf1 include:spf.protection.outlook.com -all"
If you also send via third-party providers,
add each provider's include: in
the same record (RFC 7208 §3.2 mandates a
single SPF record per domain - multiple
records cause a permerror):
your-domain.com. IN TXT "v=spf1 include:spf.protection.outlook.com include:sendgrid.net include:mailgun.org -all"
Watch the 10-DNS-lookup limit
(RFC 7208 §4.6.4). Every include:,
a:, mx:,
exists:, and redirect=
counts toward the limit, and nested includes
count for their full expansion.
spf.protection.outlook.com
consumes more than one lookup; if you have
multiple senders the limit fills quickly. The
DMARC Analyzer
Domain Security
Checker reports the live lookup count
against any SPF record.
Verify the record with
dig +short txt your-domain.com
after publication, or via the
Domain Security
Checker.
5. Step 2: Configure DKIM via the Defender portal (CNAME delegation)
M365 DKIM differs from Google Workspace DKIM
in a fundamental way: the private key
lives in Microsoft's tenant infrastructure,
not on your DNS. Operators publish two
CNAME records that delegate the DKIM
public-key resolution to
<tenant>.onmicrosoft.com.
Microsoft then publishes (and rotates) the
actual public-key TXT records on the tenant
side, transparent to operators.
- Sign in to security.microsoft.com (the Microsoft 365 Defender portal) as a Global Administrator or Security Administrator.
- Navigate to Email & Collaboration > Policies & rules > Threat policies > Email authentication settings > DKIM. The DKIM tab lists every accepted domain in the tenant. The status column shows "Sign messages for this domain with DKIM signatures" as enabled or disabled per domain.
- Select the custom domain row (NOT the
default
<tenant>.onmicrosoft.comrow - that one is already enabled and signs automatically). - The detail flyout displays the two CNAME
records you must publish at your DNS
provider:
Note the dashed-domain transformation:Host: selector1._domainkey.your-domain.com Type: CNAME Value: selector1-your-domain-com._domainkey.<tenant>.onmicrosoft.com Host: selector2._domainkey.your-domain.com Type: CNAME Value: selector2-your-domain-com._domainkey.<tenant>.onmicrosoft.comyour-domain.combecomesyour-domain-comin the target hostname. Copy the exact values the portal displays - do NOT type them by hand because the tenant identifier and the dashed-domain transformation vary by domain. - At your DNS provider, publish both CNAMEs.
Two records, one each for
selector1._domainkeyandselector2._domainkey. Most DNS providers append your domain automatically; the final FQDNs areselector1._domainkey.<your-domain>andselector2._domainkey.<your-domain>. - Wait 24-48 hours for DNS propagation. The Defender portal's "Enable" toggle will refuse to activate signing until Microsoft can resolve both published CNAMEs.
- Return to the Defender portal DKIM page and click the Enable toggle for the custom domain. Exchange Online begins DKIM-signing all outbound mail under your custom domain immediately.
- Optional PowerShell alternative: from the
Exchange Online PowerShell module, run:
Faster than the UI for bulk operations across many accepted domains; theConnect-ExchangeOnline Set-DkimSigningConfig -Identity your-domain.com -Enabled $true Get-DkimSigningConfig -Identity your-domain.comGet-DkimSigningConfigverifies the final state. - Verify by sending a test message to a
Gmail or Yahoo address you control,
opening the message source, and
confirming the
Authentication-Resultsheader showsdkim=pass header.d=your-domain.com(NOTheader.d=<tenant>.onmicrosoft.com).
Key rotation: Microsoft rotates DKIM keys automatically approximately every 6 months by alternating between selector1 and selector2 - one selector is "active" and signs new mail, the other is staged. Operators do not need to do anything. This is the primary operational advantage of the CNAME delegation design over Google Workspace's TXT-publication model.
6. Step 3: Publish DMARC at p=none
With SPF + DKIM working, publish a DMARC TXT
record at _dmarc.<your-domain>:
_dmarc.your-domain.com. IN TXT "v=DMARC1; p=none; rua=mailto:dmarc-reports@your-domain.com; fo=1"
Tags explained:
v=DMARC1- protocol version, always first.p=none- the reporting-only phase. Receivers will NOT change disposition based on DMARC outcomes; instead they will send daily aggregate reports describing every authentication result.rua=mailto:dmarc-reports@...- destination for daily aggregate (RUA) reports.fo=1- request a forensic (RUF) report on any DMARC failure (most major receivers including Microsoft do not send forensic reports - see DMARC aggregate reports deep dive - but publishing fo=1 is the operator signal).
Confirm the record is live with
dig +short txt _dmarc.your-domain.com
or via DMARC Analyzer's
Domain Security
Checker.
Reports begin arriving within 24-48 hours. Microsoft's reports arrive daily on a UTC schedule. Other major receivers (Google, Yahoo, Comcast) send on similar cadences. Forward the rua= mailbox into DMARC Analyzer (via IMAP, Microsoft Graph, or manual upload through the dashboard) for parsing.
7. Step 4: Inventory legitimate senders and fix alignment
Read aggregate reports for 2-6 weeks. For each unique sending IP / sending domain combination, determine:
- Is this a legitimate sender? M365 itself is obvious; the marketing platform you set up two years ago may not be.
- Is the sender aligned?
Either SPF must pass AND the envelope
MAIL FROM domain match your visible
From: header (organisational-domain
match for relaxed alignment), OR DKIM
must pass AND the
d=in the signature match your visible From: header. - If not aligned, what is the gap? Two M365-specific patterns dominate the alignment-failure surface: the onmicrosoft.com pattern (DKIM never enabled for the custom accepted domain - mail signs under tenant.onmicrosoft.com instead of your custom domain) and the SaaS-sender pattern (third-party platform uses its own bounce domain). Both have well-known fixes.
The #1 alignment failure for
M365 senders is the onmicrosoft.com
pattern: outbound mail from your
custom domain is signed with the tenant's
default
<tenant>.onmicrosoft.com
DKIM key (which is enabled automatically) but
NOT with the custom domain's CNAME-delegated
key (which was never enabled even though the
CNAMEs were published). DMARC alignment fails
because d=<tenant>.onmicrosoft.com
does not match the visible
From: user@your-domain.com. Fix:
confirm both CNAMEs resolve via
dig +short cname selector1._domainkey.your-domain.com
then enable signing for the custom domain via
the Defender portal toggle or
Set-DkimSigningConfig -Identity
your-domain.com -Enabled $true.
The #2 alignment failure for
M365 senders is the SaaS-sender
pattern: a third-party service
(SendGrid, Mailgun, Customer.io, Mailchimp)
sends on your behalf with the From: header
set to
marketing@your-domain.com but
the envelope MAIL FROM domain pointing at
the SaaS provider's bounce domain. SPF
evaluates the bounce domain (passes) but
doesn't align with your visible From: -
DMARC fails. Fix: enable DKIM signing with
d=your-domain.com in each SaaS
provider's settings, typically via a
CNAME-delegated subdomain selector like
em1234._domainkey.your-domain.com
CNAME em1234.sendgrid.net.
Continue iterating until every legitimate sender shows in reports as DMARC-pass. Note that some senders may take a full week to surface (cron-driven monthly billing emails, one-off campaign sends).
8. Step 5: Advance from p=quarantine to p=reject (with Trusted ARC Sealers)
Once every legitimate sender is aligned,
advance the DMARC record to
p=quarantine:
_dmarc.your-domain.com. IN TXT "v=DMARC1; p=quarantine; rua=mailto:dmarc-reports@your-domain.com; fo=1"
Receivers begin delivering DMARC-failing mail
to spam (or the equivalent quarantine folder
at Microsoft, the Junk Email folder at
Outlook.com / Hotmail). Continue monitoring
reports for unexpected failures. A common
pattern: a monthly cron job sends from an
unaligned legacy script the operator forgot
about - the first month at
p=quarantine surfaces it loudly.
After 1-3 months at
p=quarantine without unexpected
failures, advance to p=reject:
_dmarc.your-domain.com. IN TXT "v=DMARC1; p=reject; rua=mailto:dmarc-reports@your-domain.com; fo=1"
DMARC-failing mail is now bounced at the SMTP boundary. Spoofing of your domain at DMARC-honouring receivers is no longer possible. You have completed the rollout.
Never skip from p=none
to p=reject. The
p=quarantine intermediate phase
exists specifically so failed mail goes to
spam (recoverable) rather than bouncing
(unrecoverable). The single most common
self-inflicted email outage in DMARC
rollouts is skipping this phase. See the
DMARC
policy rollout deep dive for the full
rationale.
Trusted ARC Sealers - the M365-specific feature
M365 tenants using a security gateway (Proofpoint, Mimecast, Cisco IronPort) for inbound filtering have a unique problem: legitimate forwarded mail can fail DMARC at the Exchange Online boundary because the gateway modifies headers, breaking the original DKIM signature. Without intervention, rolling out p=reject on YOUR OWN domain may cause OTHER senders' aligned mail (forwarded through your gateway) to be rejected by your Exchange Online tenant.
Defender for Office 365 Trusted ARC
Sealers
(configured via the Defender portal Email
authentication settings > ARC tab) tells
Exchange Online to trust ARC signatures from
specific named intermediaries when
re-evaluating DMARC. The intermediary captures
the original SPF/DKIM verdict in an ARC seal
(RFC 8617); Exchange Online verifies the seal,
consults the seal's chain
cv= state, and re-applies the
original DMARC verdict if the chain is intact.
Configure each trusted intermediary by its
DKIM signing-domain (the
d= in the ARC-Message-Signature
header):
# PowerShell example
Set-ArcConfig -Identity 'Default' -ArcTrustedSealers @{add='proofpoint.com','mimecast.com'}
Available to Defender for Office 365 Plan 1/2 tenants. See ARC explained for the protocol-level deep dive on how ARC preserves auth results across hops.
For granular ramping, use the
pct= tag: p=quarantine;
pct=5 applies the quarantine
disposition to 5% of failing mail, leaving
95% at p=none. RFC 7489 §6.3
defines the semantics; note that the
dmarcbis draft deprecates
pct= so this is a transitional
feature.
9. Microsoft 365-specific gotchas
- The default
<tenant>.onmicrosoft.comdomain. The tenant's initial Microsoft-provided domain is DKIM-signed automatically from day one - this is why M365 mail "appears to have DKIM" even when no operator configuration was done. The gotcha: that signature is under<tenant>.onmicrosoft.com, NOT your custom domain. DMARC for your custom domain still fails until you publish CNAMEs and enable DKIM for the custom accepted domain. - Direct Send and M365 SMTP relay. On-premises servers and devices (copiers, line-of-business apps) that relay mail through M365 Direct Send must also be covered by your SPF record AND by an appropriate DKIM signing configuration. Mail relayed via the M365 SMTP relay connector inherits the M365 DKIM signature if the custom domain has DKIM enabled; mail sent via Direct Send may not - confirm by inspecting the Authentication-Results header on a test message.
- Shared mailboxes and group mail. Mail sent from a shared mailbox or Microsoft 365 Group inherits the tenant's DKIM configuration like any normal user message. No special handling needed.
- Hybrid Exchange with mail flow through on-premises. If your mail-flow connector routes outbound mail through an on-premises Exchange server (centralised mail flow), Exchange Online does NOT sign with DKIM - the on-premises path is the outbound boundary. In that topology you need a separate DKIM signer on-premises (third-party plugin or Exchange Transport Rule with an external signer), and the M365 CNAME-based DKIM is not in play.
- Exchange Online Protection anti-spoof policy. The Defender portal's anti-spoof settings are SEPARATE from DKIM and DMARC. Anti-spoof catches spoofed senders that DMARC misses (e.g. domains without DMARC published). Both layers should be configured; one is not a substitute for the other.
- The selector1/selector2 rotation
is not visible to operators.
Microsoft alternates which selector is
"active" approximately every 6 months
without notification. If you inspect a
DKIM signature on outbound M365 mail you
may see
s=selector1one month ands=selector2the next - this is normal and intentional. Do NOT delete one of the CNAMEs.
10. Common Microsoft 365 + DMARC mistakes
- Publishing CNAMEs but never
enabling DKIM in the Defender portal.
The Defender portal "DKIM" tab shows
"Status: Not configured" even after both
CNAMEs are live - the operator must
explicitly click Enable (or run
Set-DkimSigningConfig -Enabled $true). The mail signs under onmicrosoft.com until this step is completed. The single most common M365 DMARC failure mode. - Publishing only one of the two CNAMEs. Both selector1 and selector2 must resolve before the Defender portal will let you enable signing. The portal's pre-flight check rejects activation if either CNAME is missing.
- Publishing the DKIM record as a TXT instead of a CNAME. M365 DKIM uses CNAME delegation (unlike Google Workspace which publishes the public key as a TXT record). The CNAME target points at Microsoft's tenant infrastructure. Publishing a TXT record at selector1._domainkey will break the CNAME chain.
- Forgetting the dashed-domain
transformation. Microsoft
transforms
your-domain.comintoyour-domain-comin the CNAME target. Manually constructing the CNAME target without copying it from the Defender portal usually fails because the operator forgets to swap dots for dashes. Always copy the exact value the portal displays. - Forgetting to advance past
p=none. The reporting-only phase does NOT stop spoofing. Advance to enforcement after 2-6 weeks of clean reports. - Two SPF records on the same
domain. RFC 7208 §3.2 mandates
a single SPF record. Merge multiple
records into one with concatenated
include:directives. - SPF over 10 DNS lookups.
spf.protection.outlook.complus several third-partyinclude:directives commonly blow the limit. Use Domain Security Checker to count lookups and flatten or remove unused providers. - Skipping SaaS-sender
alignment. The marketing
platform that sends from
noreply@your-domain.comwithout DKIM-signing under your domain will fail DMARC even after M365 is clean. Configure CNAME-delegated DKIM in every SaaS provider's settings. - Publishing DMARC at
p=rejectwithout alignment fix-up. The fastest path to a self-inflicted email outage. Always ingest reports atp=nonefor 2-6 weeks first. - Treating DMARC as one-time work. New SaaS deployments, partner integrations, and acquired domains constantly surface new senders. Indefinite monitoring is the ongoing cost of DMARC enforcement.
11. Troubleshooting
- "Status: Not configured" in the
Defender portal even after CNAME
publication. Microsoft hasn't
finished resolving both CNAMEs yet. DNS
propagation can take 24-48 hours. Verify
independently with
dig +short cname selector1._domainkey.your-domain.comanddig +short cname selector2._domainkey.your-domain.com; both must return the Microsoft tenant targets. If they do but the portal still shows "Not configured", wait an additional 24 hours (Microsoft's portal cache lags published DNS by several hours) and retry. - "My M365 mail goes to spam at Gmail despite DKIM pass". DKIM pass does not guarantee inbox delivery - Gmail's content-based spam filter operates downstream. Check Google Postmaster Tools for the reputation signal and spam-complaint rate. Anything >0.1% in Postmaster Tools is a warning; >0.3% triggers spam-folder delivery regardless of DMARC.
- "DMARC reports show DKIM
header.d=onmicrosoft.com, not my custom
domain". DKIM was never enabled
for the custom accepted domain. The
tenant's default onmicrosoft.com key is
signing instead. Enable DKIM for the
custom domain via the Defender portal
toggle or
Set-DkimSigningConfig -Identity your-domain.com -Enabled $true. This is the #1 M365 DMARC failure mode. - "DMARC reports show DKIM pass + SPF pass but DMARC fail". An alignment failure. The SPF-passing domain or DKIM-signing domain does not match the visible From: header. See DMARC alignment explained for the deep dive - the SaaS-sender CNAME delegation pattern is the canonical fix.
- "My SPF record is failing with permerror". Almost always the 10-DNS-lookup limit. Run Domain Security Checker to see the live count.
- "Forwarded mail through our security gateway fails DMARC at the Exchange Online boundary". Configure Defender for Office 365 Trusted ARC Sealers for the gateway (Proofpoint / Mimecast / Cisco IronPort). See ARC explained for the protocol-level background.
- "How do I see my outbound DKIM
signature in M365?" Send a test
message to a Gmail or Yahoo address you
control. Open the message source. The
Authentication-Results header shows
dkim=pass header.d=your-domain.comwhen signing is working correctly. If you seeheader.d=<tenant>.onmicrosoft.cominstead, DKIM was never enabled for the custom domain - see the first troubleshooting entry.
12. Frequently asked questions
- How do I set up DMARC for Microsoft 365?
-
Five steps. Publish SPF at the domain
apex with
include:spf.protection.outlook.com. Publish two CNAME records atselector1._domainkeyandselector2._domainkeypointing at the Defender-portal-displayed tenant targets, wait for DNS propagation, and click Enable in the Defender portal (or runSet-DkimSigningConfig -Identity your-domain.com -Enabled $true). Publish DMARC at_dmarcstarting atp=nonewith arua=mailbox. Ingest reports for 2-6 weeks to align every legitimate sender. Advance throughp=quarantinetop=reject. - What is the Microsoft 365 SPF include?
-
include:spf.protection.outlook.com. Minimum record:v=spf1 include:spf.protection.outlook.com ~all; production:v=spf1 include:spf.protection.outlook.com -all. Stay under the 10-DNS-lookup limit when adding third-party senders. - What DKIM selectors does Microsoft 365 use?
-
selector1andselector2, both published as CNAMEs (not TXT) that delegate to<tenant>.onmicrosoft.com. Microsoft rotates keys automatically by alternating between the two selectors every 6 months. - Why is my Microsoft 365 mail signed under onmicrosoft.com instead of my custom domain?
-
DKIM was never enabled for the custom
accepted domain. The tenant's default
onmicrosoft.com key is signing instead.
Enable DKIM via the Defender portal
toggle or
Set-DkimSigningConfig -Identity your-domain.com -Enabled $true. The #1 M365 DMARC failure mode. - What is the Defender for Office 365 Trusted ARC Sealers feature?
- A Defender for Office 365 feature that lets Exchange Online accept ARC signatures from named trusted intermediaries (Proofpoint, Mimecast, Cisco IronPort) when re-evaluating DMARC on inbound mail. Makes p=reject coexist with security-gateway-forwarded mail. Configured at security.microsoft.com > Email authentication settings > ARC.
- Why is my DMARC failing despite SPF and DKIM passing on Microsoft 365?
-
Alignment failure. Either the
onmicrosoft.com pattern (DKIM never
enabled for custom domain - see dedicated
FAQ entry) or the SaaS-sender pattern
(third-party platform uses its own
bounce domain). Fix by enabling DKIM with
d=your-domain.comin each path, most commonly via CNAME-delegated subdomain selectors for SaaS providers. - Do I need DMARC if I only use Microsoft 365?
- Yes. Microsoft's outbound authentication does not stop attackers from spoofing your domain at other receivers - DMARC at enforcement is what closes that gap. The Feb 2024 Google/Yahoo bulk-sender requirements additionally demand DMARC for any high-volume M365 tenant.
- Where do I see DMARC reports for Microsoft 365 mail?
-
Receivers (Microsoft, Google, Yahoo,
and others) send daily aggregate reports
to the
rua=mailbox in your DMARC record. DMARC Analyzer ingests these viaincludes/DmarcParser.phpand surfaces the per-sender breakdown. The Microsoft 365 Defender portal Email entity view provides per-message delivery telemetry for your own mail flow but is not a substitute for parsing DMARC aggregate reports.
Deploy DMARC for your Microsoft 365 tenant now
DMARC Analyzer parses the daily aggregate
reports Microsoft and other receivers send
to your rua= mailbox,
deduplicates by report_id +
org_name, and surfaces the
per-sender / per-IP / per-day breakdown
needed to drive the alignment fix-up phase.
Live DNS verification for every SPF / DKIM
/ DMARC record on your domain runs through
includes/DnsChecker.php; the
Email Header
Analyzer at
header_analyzer.php diagnoses
individual message failures by parsing the
full Authentication-Results stack via
includes/EmailHeaderParser.php.