Microsoft 365
Setup DMARC Office 365: step by step on Microsoft 365 domains
Set up DMARC in Office 365: add a _dmarc TXT record at your DNS host, start with p=none, read the reports, then move to quarantine and reject with care.
Before you start
To set up DMARC for Office 365, publish one TXT record named _dmarc for each domain that sends mail, and start with p=none, which only monitors. Microsoft's documentation calls the service Microsoft 365.
- Custom domain such as
example.com. Create the record at your registrar or DNS host, because Microsoft 365 has no portal or PowerShell cmdlet for it. You need access to that account. If Microsoft 365 hosts your DNS, use Settings > Domains > your domain > DNS records > + Add records. - The
*.onmicrosoft.comdomain. You add the record in the Microsoft 365 admin center. Microsoft requires the Domain Name Administrator role to add or change domains. Its DMARC page names no role for this record.
First configure SPF for Microsoft 365 and DKIM signing for every custom domain and subdomain that sends mail. Microsoft's DKIM page says custom domains get no DKIM signing until you set it up.
Choose a shared mailbox or reporting service for aggregate reports, the XML summaries that receiving servers typically send once a day.
Steps
-
At your DNS host, edit the existing
_dmarcTXT record. Create one only if absent; keep one record per name. For a new record, use this monitoring value:TXTv=DMARC1; p=none; rua=mailto:dmarc@example.com
-
Add a record for the
*.onmicrosoft.comdomain too. In the admin center atadmin.microsoft.com, go to Show all > Settings > Domains and click that domain's row. Open the DNS records tab and select Add record. Enter_dmarcin TXT name, paste the value below in TXT value, and select Save.TXTv=DMARC1; p=reject
Microsoft gives this value for domains that send no mail, including domains you registered and never use. Check first that no mailbox or app sends from that address. If one does, use
p=nonewith aruaaddress. -
Read the aggregate reports weekly and fix all legitimate senders. Start with a low-volume domain. RFC 9989 advises mailing-list user domains against
p=reject; if proceeding anyway, monitor atp=nonefor at least a month, then atp=quarantinefor as long. -
When legitimate mail passes, edit the existing
_dmarcrecord to move to quarantine. Do not add another record:TXTv=DMARC1; p=quarantine; rua=mailto:dmarc@example.com
Caution: from here, legitimate mail that fails DMARC can land in junk or quarantine. Microsoft also routes outbound mail that fails DMARC at the destination through its high-risk delivery pool when your policy is
p=quarantineorp=reject. Many receiving servers refuse that pool, and Microsoft offers no override. -
After further monitoring, edit the same record to move to reject:
TXTv=DMARC1; p=reject; rua=mailto:dmarc@example.com
Caution:
p=rejectasks receiving servers to refuse failing mail. RFC 9989 says domains that publish it must apply valid DKIM signatures and must not rely on SPF alone. It also advises domains whose users post to mailing lists not to use it. Repeat these steps for each remaining subdomain, then the parent.
Confirm it worked
- Run
nslookup -type=TXT _dmarc.example.com 1.1.1.1or use the DMARC checker. You should see exactly one record that starts withv=DMARC1. Microsoft gives no propagation time for this record. A resolver that cached the old answer can keep it for the TTL (cache lifetime), which is 1 hour in the admin center. - Send a message to a mailbox outside your organization and open its headers. In Authentication-Results, look for
dmarc=passandheader.from=example.com. - Wait at least a full day for the first aggregate report at your
ruaaddress.
Common problems
dmarc=bestguesspassin the header. No DMARC record exists for the domain. Publish the record and check its name.- DKIM passes but DMARC fails. If
header.d=shows a*.onmicrosoft.comdomain or another domain, DKIM does not align. Configure DKIM for the exact domain in the From address. - A third-party service fails DMARC. SPF can pass for the service's domain while
smtp.mailfrom=(the envelope sender) is not yours. Set up DKIM with your domain at that service. - Two TXT records at
_dmarc. RFC 9989 Section 4.10 discards them all. Keep one. - No reports from Microsoft. Microsoft 365 sends aggregate reports only when the recipient domain's MX record (mail routing) points directly to Microsoft 365. Hybrid setups and third-party gateways stop them. It does not send failure reports, even with a valid
ruf=address. See DMARC reports not received.