Microsoft 365 email authentication gets confusing faster than it should, mostly because every tenant has at least two domain stories happening at once:
example.com.onmicrosoft.com domainAnd those two do not behave the same way.
That is where many rollouts go sideways. Teams verify example.com, see Microsoft 365 mail flowing, maybe publish the basic SPF record during tenant setup, and assume the rest is automatic. It is not. Microsoft handles some pieces for the tenant domain, but for custom domains you still need to publish and enable the right records yourself.
Microsoft's current guidance is spread across its email authentication overview, SPF setup, DKIM setup, and DMARC setup. Read those if you want the vendor wording. This post focuses on the operational version: what to publish, where to publish it, and the mistakes that keep showing up.
In Microsoft 365, your tenant gets a built-in Microsoft Online Email Routing Address, usually written as your <tenant>.onmicrosoft.com domain.
At the same time, most organizations also add one or more custom domains for actual user-facing mail, such as:
example.commarketing.example.combilling.example.comReceivers care about the domain that is actually used in the message identities. So the first practical question is not "What does Microsoft 365 own for us?" It is:
Which domain appears in From: on the mail you send?
If users send as alice@example.com, then example.com needs its own correct SPF, DKIM, and DMARC posture. The fact that Microsoft already controls your tenant's .onmicrosoft.com namespace does not automatically protect example.com.
If DMARC alignment still feels slippery, DMARC identifier alignment deep dive is the right refresher.
.onmicrosoft.comMicrosoft's documentation is fairly clear on this part:
.onmicrosoft.com domain is already maintained by Microsoft.onmicrosoft.com domain is already DKIM-signed by default.onmicrosoft.com domain is not automatically done for youThat last bullet surprises people.
If you actually send mail using the .onmicrosoft.com domain in From:, Microsoft says you should add a DMARC TXT record for that domain in the Microsoft 365 admin center. If you do not use the .onmicrosoft.com domain for email, Microsoft also recommends protecting it with a rejecting DMARC policy so nobody can spoof it more easily.
So the short operational rule is:
.onmicrosoft.com domain: add DMARC.onmicrosoft.com domain: add DMARC with p=rejectThis matters because many tenants never intend to send visible mail from .onmicrosoft.com, but the domain still exists and is still associated with the organization.
For a custom domain like example.com, think in three layers.
If Microsoft 365 is the only source of mail for example.com, Microsoft's documented SPF record is:
example.com. IN TXT "v=spf1 include:spf.protection.outlook.com -all"If you also send from somewhere else, such as an on-premises server or a third-party platform, the SPF record has to include those legitimate sources too.
Two details matter here:
That second point is easy to miss. example.com does not cover marketing.example.com for SPF. Microsoft says this explicitly.
If your SPF record is starting to sprawl, SPF 10 DNS lookup limit explained is worth keeping open while you edit DNS.
This is the piece most Microsoft 365 custom-domain setups are missing.
For custom domains, Microsoft does not just start signing with your domain automatically. You need to enable DKIM for that domain and publish the two CNAME records Microsoft gives you.
The current Microsoft model is:
Get-DkimSigningConfig in Exchange Online PowerShell.selector1 and selector2 CNAME targets Microsoft gives for that domain.This is important in 2026 because Microsoft introduced an updated DKIM CNAME format for newer custom domains. The target values now include a dynamic partition character, so old blog posts and old screenshots can be wrong for your tenant. In other words, do not guess the DKIM targets from memory.
Use the values Microsoft shows for your actual domain.
Microsoft's own PowerShell example for checking the right values is:
Get-DkimSigningConfig -Identity example.com | Format-List Name,Enabled,Status,Selector1CNAME,Selector2CNAMEIf DKIM is not enabled for the visible domain, DMARC often ends up leaning too heavily on SPF. That works until forwarding, relaying, or a sender-path change exposes the weakness.
After SPF and DKIM are in place, publish DMARC on the custom domain itself:
_dmarc.example.com. IN TXT "v=DMARC1; p=none; rua=mailto:dmarc@example.com"Starting with p=none is still the sane move for active domains, especially if the domain has multiple senders or any history of "one forgotten app sends invoices sometimes." Microsoft recommends a gradual rollout from p=none to p=quarantine and then p=reject.
For a normal Microsoft 365 custom-domain rollout, the order should be:
p=noneIf you want the mechanics behind the DMARC tags themselves, DMARC record tag cookbook covers them in plain language.
This is the easiest way to keep the setup straight.
For example.com used as a Microsoft 365 sending domain:
example.comexample.com, then enable signing in Microsoft 365_dmarc.example.comFor a sending subdomain like marketing.example.com:
marketing.example.commarketing.example.com and enable DKIM for that subdomain in Microsoft 365_dmarc.marketing.example.com policy if you need different handlingFor the tenant's .onmicrosoft.com domain:
That last line is the one people tend not to expect.
.onmicrosoft.com setup covers the custom domainIt does not.
If your users send as user@example.com, receivers evaluate example.com identities. You still need SPF for example.com, DKIM signing for example.com, and DMARC for example.com.
The tenant domain is not a magic umbrella.
This is probably the single most common Microsoft 365 authentication gap.
Tenant mail is flowing. SPF passes. People stop there.
But Microsoft's custom-domain guidance explicitly says you need to configure DKIM signing with the custom domain or subdomain if you want aligned DKIM and proper DMARC support. Without that, a lot of mail is one forwarding hop away from pain.
Older Microsoft 365 DKIM guides, cached screenshots, and forum answers often show selector targets that no longer match what newer tenants receive.
If the domain status in Defender says CnameMissing, do not immediately assume DNS is broken in general. First check whether the target values were copied exactly from the current Microsoft interface or current Get-DkimSigningConfig output.
This is especially easy to get wrong with:
_domainkey labelsMicrosoft says DMARC can inherit from the parent domain, but SPF and DKIM do not work that way.
So if you send some mail as alerts@billing.example.com, then billing.example.com needs its own sending-domain treatment. Reusing the parent domain's records is not enough.
This is one reason DMARC subdomain policy guide matters operationally, not just academically.
Microsoft documents a detail that catches people during verification: DKIM signatures can be omitted when the sender and recipient are in the same domain, or in different domains controlled by the same organization.
So if you are checking headers only on internal Microsoft 365 mail flow, you can end up proving almost nothing.
For verification, send to an external mailbox and inspect the full headers there.
.onmicrosoft.com domain still deserves DMARCA tenant can be fully standardized on example.com and still leave the .onmicrosoft.com domain unprotected because "nobody uses it."
That is exactly why it should usually have a rejecting DMARC policy.
Microsoft recommends subdomains for services you do not directly control. That advice is good for two reasons:
If a marketing platform is sending on your behalf, marketing.example.com is often a much healthier choice than forcing everything through example.com.
If the environment is messy, use this order:
From:.p=none and rua= on active sending domains.Authentication-Results.p=reject on unused domains, including the tenant's .onmicrosoft.com domain if it is not used for visible mail.If you are troubleshooting header-level results while doing that, DMARC troubleshooting with real headers is the shortest route to seeing what receivers are actually evaluating.
In Microsoft 365, the built-in .onmicrosoft.com domain and your custom domains are related, but they are not interchangeable.
Microsoft already handles SPF and default DKIM signing for the tenant domain. For custom domains, you still need to publish SPF, enable DKIM with the exact CNAME targets Microsoft gives you, and publish DMARC yourself. And for the tenant's .onmicrosoft.com domain, DMARC still needs deliberate attention, whether that domain is used or parked.
Once that model clicks, the setup becomes much less mysterious: protect the domain people actually see, do not assume custom-domain DKIM is automatic, and treat the .onmicrosoft.com domain as a real domain that needs an explicit DMARC decision.