Office 365 DMARC Guide: DNS Records & Alignment (2027)
Implement DMARC for Office 365 and Microsoft 365 organizations. Follow DNS configuration steps, verify SPF and DKIM alignment, and enforce reject policies.
By Arkay · Updated · Published

What did compiled research reveal about Office 365 DMARC implementation?
On November 27, 2026, we compiled technical specifications, DNS record parameters, and phased enforcement rules for implementing DMARC in Microsoft 365 and Office 365 from official Microsoft documentation and RFC 7489. The primary sources examined include official Microsoft Defender for Office 365 technical documentation and published standards from the Internet Engineering Task Force.
Our compiled dataset highlights how authentication mechanisms coordinate envelope transmission parameters with cryptographic headers and policy enforcement:
| Technical Parameter | Specification Requirement | DNS Record Syntax | Functional Purpose |
|---|---|---|---|
| Protocol Version | Mandatory first tag | v=DMARC1 | Identifies the record as DMARC version 1 |
| Policy Enforcement | Mandatory second tag | p=none, quarantine, reject | Dictates receiver handling of unaligned mail |
| Aggregate Reporting | Strongly recommended | rua=mailto:address | Delivers daily XML authentication summaries |
| Forensic Reporting | Optional parameter | ruf=mailto:address | Delivers real-time diagnostic failure alerts |
| Alignment Mode (SPF) | Optional (default: relaxed) | aspf=r or aspf=s | Governs envelope and header domain matching |
| Alignment Mode (DKIM) | Optional (default: relaxed) | adkim=r or adkim=s | Governs cryptographic signing domain matching |
Research demonstrates that a message passes DMARC in Microsoft 365 if either SPF passes with domain alignment or DKIM passes with domain alignment. DMARC verifies alignment between the 5321.MailFrom envelope address used in SMTP transmission and the 5322.From address displayed in email clients. A message fails DMARC only if both SPF and DKIM mechanisms fail their respective alignment evaluations.
How do you create and publish a DMARC TXT record for Microsoft 365?

Administrators enable DMARC for an Office 365 domain by publishing a single TXT resource record using host label _dmarc within their authoritative DNS provider. External message transfer agents query this designated DNS location whenever evaluating incoming messages originating from your organization.
Publishing your operational DMARC policy follows five sequential administrative steps:
-
Access your authoritative DNS management console, such as Cloudflare or GoDaddy.
-
Create a new TXT record and insert _dmarc into the record host or name field.
-
Assign the Time to Live parameter to your provider's standard caching default.
-
Input the protocol string specifying version and initial monitoring: v=DMARC1; p=none; rua=mailto:dmarc-reports@yourdomain.com.
-
Save the configuration and verify global propagation across internet nameservers.
According to RFC 7489, DMARC policy discovery checks the DNS for a TXT record at _dmarc.example.com and discards records that do not begin with v=DMARC1. In addition, under RFC 7489, if a retrieved DMARC policy record lacks a valid p tag but contains a valid rua reporting URI, receivers treat the record as p=none. Administrators verify published TXT strings using standard DNS lookup utilities to confirm global record visibility before reviewing incoming telemetry data.
What is DMARC and why is it needed in Office 365?
Deploying DMARC in Office 365 stops unauthorized senders from forging company email domains, shielding business communications from sophisticated phishing, ransomware, and identity deception. While legacy email infrastructure permitted any external mail server to insert arbitrary identities into message headers, modern messaging ecosystems mandate cryptographic accountability.
Executing a disciplined dmarc setup microsoft 365 strategy closes security loopholes that exposed organizational brand equity. Without defensive policies in place, receiving gateways accept deceptive inbound messages because they lack definitive instructions regarding unauthenticated traffic. DMARC gives receiving security systems binding instructions on whether to admit, isolate, or drop messages that fail validation.
Beyond direct spoofing prevention, DMARC establishes automated feedback channels. Recipient mail servers return structured XML telemetry detailing passing and failing IP addresses. This reporting capability grants network engineers total visibility into authorized cloud platforms, ticketing software, and third-party SaaS vendors operating across their corporate messaging footprint.
What are the SPF and DKIM prerequisites before configuring DMARC?
Implementing DMARC requires establishing functional baseline authentication across both Sender Policy Framework and DomainKeys Identified Mail. DMARC does not generate cryptographic signatures or IP allowances itself; rather, it examines the validation outcomes delivered by these two complementary foundational standards.
Under Microsoft Defender specifications, establishing SPF for custom cloud domains mandates adding a DNS TXT record containing include:spf.protection.outlook.com at the custom domain apex. SPF empowers recipient transfer agents to verify whether the transmitting IP address is an authorized gateway for the envelope sender (5321.MailFrom) identity. In addition, each custom subdomain used to send email from Microsoft 365 requires its own dedicated SPF TXT record to preserve sending legitimacy.
Concurrently, system engineers must provision DKIM in Microsoft 365 to apply digital signatures to outbound message headers. Microsoft 365 provisions cryptographic signing by requiring two CNAME records pointing to selector1 and selector2 for each custom domain. This dual-selector configuration allows Microsoft to perform automated cryptographic key rotation while guaranteeing that the signing domain (the d= parameter in the DKIM header) aligns with your public From address.
What are the DMARC policy enforcement stages from monitoring to reject?

Progressing through DMARC enforcement requires a measured, multi-phase trajectory to avoid blocking legitimate outbound corporate correspondence. Upgrading immediately to total rejection without auditing external delivery pipelines frequently interrupts customer invoices, marketing platforms, and automated workflow notifications.
Technical guidelines define three distinct policy actions for unauthenticated messages:
-
Monitoring Mode (p=none): During this foundational phase, recipient systems take no filtering action against unaligned messages. Inbound mail delivers as normal while external mail servers route daily XML aggregate reports to your designated rua address. Administrators utilize this auditing window to identify legitimate third-party senders and remediate alignment errors.
-
Quarantine Mode (p=quarantine): After verifying that all legitimate corporate email sources achieve SPF and DKIM alignment, administrators update the record to quarantine. In this stage, messages failing DMARC alignment are redirected to the recipient's Junk Email folder or held in quarantine queues, shielding users from direct deception while allowing message recovery.
-
Reject Mode (p=reject): The ultimate defensive standard directs recipient mail servers to outright block and reject unaligned messages during the initial SMTP handshake. Attackers attempting to spoof your domain face total message dropping, providing complete brand protection.
Administrators can utilize percentage tags during quarantine transitions to apply filtering rules to a subset of messages before enforcing complete domain lockdown.
How do you configure DMARC for default onmicrosoft.com tenant domains?
Administrators must create a DMARC TXT record for default *.onmicrosoft.com domains in the Microsoft 365 admin center under Settings > Domains. While engineering teams prioritize custom customer-facing domains, unmanaged default tenant routing addresses present an overlooked attack surface if left unmonitored.
When setting up a cloud tenant, Microsoft automatically provisions a dedicated routing address structured as company.onmicrosoft.com. While Microsoft manages SPF records and DKIM infrastructure for this underlying tenant address, it does not publish a DMARC policy record for onmicrosoft.com subdomains. Threat actors cognizant of this administrative gap can attempt to abuse your tenant name in targeted social engineering attacks.
Hardening the default tenant domain requires publishing a dedicated TXT record within the Microsoft 365 administration console. System operators navigate to the onmicrosoft.com domain settings and create a TXT record with host _dmarc. Because legitimate day-to-day business correspondence should never originate directly from bare onmicrosoft.com addresses once custom domains are configured, security teams generally publish a strict reject policy immediately. Setting p=reject on default tenant domains closes a common spoofing vector without impacting corporate messaging workflows.
More guides in Email Security.
Related guides
Frequently asked questions
- How does domain alignment work between SPF, DKIM, and From headers?
- DMARC verifies that the domain in the visible 5322.From header matches either the envelope 5321.MailFrom domain used by SPF or the d= signing domain used by DKIM. Under relaxed alignment, subdomains align with the root domain, while strict alignment requires an exact match.
- What are the differences between p=none, p=quarantine, and p=reject policies?
- The p=none policy monitors traffic by generating aggregate reports without altering delivery. The p=quarantine policy diverts unaligned mail to junk folders, while p=reject blocks and drops unauthenticated messages at the receiving gateway.
- How do you troubleshoot DMARC failure reports and routing errors in Exchange Online?
- Administrators inspect incoming Authentication-Results headers for spf=fail or dkim=fail entries and review aggregated XML reports sent to their rua address. PowerShell cmdlets like Get-AntiPhishPolicy and Resolve-DnsName verify tenant settings and public DNS records.
Sources
- Under RFC 7489, DMARC policy discovery checks the DNS for a TXT record at _dmarc.example.c (datatracker.ietf.org)
- DMARC is enabled for a domain in Microsoft 365 by creating a TXT record with host name _dm (learn.microsoft.com)
- SPF for custom cloud domains in Microsoft 365 requires publishing a DNS TXT record contain (learn.microsoft.com)
- DKIM in Microsoft 365 requires publishing two CNAME records pointing to selector1 and sele (learn.microsoft.com)