How to set up DMARC for Office 365 and Microsoft 365

The records for your custom and onmicrosoft.com domains, where reports go, and Microsoft's rollout from p=none to reject.

DMARC tells receiving mail servers what to do with a message that claims to be from your domain but fails authentication, and it gets you reports on everyone sending as your domain. In Microsoft 365 (still often called Office 365), there's no portal setting or PowerShell command for DMARC on a custom domain. It's a TXT record you add at your DNS host.

There's one exception, covered below: your onmicrosoft.com domain, whose DMARC record you add in the Microsoft 365 admin center. Microsoft's guidance is to roll out gradually, from p=none to p=quarantine to p=reject, and this guide follows it.

See where you are now. Rigcheck reads your SPF, DKIM and DMARC records and shows which ones are missing.

Before you start: SPF and DKIM first

A message passes DMARC when SPF or DKIM passes and the domain it checked matches the domain in the From address. Microsoft says to set up both for every custom domain and subdomain you send from before you configure DMARC.

  • SPF: a TXT record at the root of your domain that includes include:spf.protection.outlook.com.
  • DKIM: the two CNAME records, selector1._domainkey and selector2._domainkey, from the Defender portal, with signing switched on for your domain.

The Microsoft 365 SPF, DKIM and DMARC guide covers both, and the Office 365 DKIM checker confirms your CNAME records point to Microsoft.

DKIM is the one people skip. Until you turn it on for your custom domain, Microsoft signs your mail with your onmicrosoft.com domain, which doesn't match your From address. Your mail may still pass DMARC through SPF, but SPF breaks when mail is forwarded, so DMARC enforcement without DKIM is fragile.

Step 1: Create a place for reports

Receivers send DMARC aggregate reports, usually once a day, as compressed XML attachments listing the servers that sent mail as your domain and whether each passed. Microsoft recommends a dedicated mailbox or Microsoft 365 Group for them, such as dmarc-reports@yourdomain.com, rather than a person's mailbox.

The raw XML is hard to read. Microsoft suggests automating it or using a DMARC reporting service, which turns reports into a dashboard and tells you the exact rua= address to use.

Step 2: Add the DMARC record for your custom domain

At your DNS host (wherever your domain's DNS is managed, which isn't always where you bought it), add a TXT record:

Host_dmarc
TypeTXT
Valuev=DMARC1; p=none; rua=mailto:dmarc-reports@yourdomain.com

Enter just _dmarc in the name field. Most DNS hosts add your domain automatically, so typing the full name can create _dmarc.yourdomain.com.yourdomain.com.

Only one DMARC record. If _dmarc already has a record starting with v=DMARC1, edit it. Microsoft lists more than one record as a cause of DMARC errors.

Microsoft's examples also include ruf=, an address for failure reports. You can leave it out: Microsoft 365 itself doesn't send failure reports, few other receivers do, and Microsoft suggests starting with rua only. Microsoft's examples also include pct=100, which is the default when pct is left out.

After saving, the DNS propagation checker shows when the big public resolvers can see it: choose TXT and enter _dmarc. followed by your domain.

Step 3: Add DMARC for your onmicrosoft.com domain

Every tenant has a yourcompany.onmicrosoft.com domain. Microsoft already handles its SPF and DKIM, but you add its DMARC record yourself, in the admin center:

  1. In the Microsoft 365 admin center (admin.microsoft.com), go to Settings → Domains.
  2. Click the onmicrosoft.com domain (on the name, not the check box), then open the DNS records tab.
  3. Click Add record. Leave the type as TXT, enter _dmarc as the TXT name, and leave the TTL at 1 hour.
  4. For the value, if nobody sends mail from the onmicrosoft.com address, enter v=DMARC1; p=reject. That's Microsoft's recommendation for a domain that doesn't send. If you do send from it, start at p=none with a rua= address and follow the same rollout as below.
  5. Click Save.

Step 4: Read the reports

Microsoft doesn't set a fixed time at p=none. Give it at least a few weeks, and longer if you send monthly mail, such as invoices, that won't appear in a shorter window. For each source in the reports:

  • Microsoft 365, passing. Your normal mail. Nothing to do.
  • A service you use, failing. A newsletter tool, CRM or help desk sending as your domain. Microsoft's fix is to set up DKIM with your domain in that service, or change the service's bounce (MAIL FROM) address to your domain. Rigcheck has setup guides for the common ones.
  • Sources you don't recognize. A forgotten tool or someone spoofing your domain. If it's spoofing, your DMARC policy is what will stop it.

Microsoft also suggests a different order for organizations with several domains: start with a subdomain that sends little mail, and do the main domain last.

Step 5: Move to quarantine, then reject

Once your legitimate mail passes, change the policy to p=quarantine. Failing mail then goes to the recipient's junk folder. Microsoft suggests using pct= to apply it to a growing share of failing mail, in steps of 10, 25, 50, 75 and 100:

v=DMARC1; p=quarantine; pct=10; rua=mailto:dmarc-reports@yourdomain.com

After enough time at 100% with no legitimate mail failing, change to p=reject, which Microsoft names as the goal for every custom domain and subdomain. Failing mail is refused and never delivered:

v=DMARC1; p=reject; rua=mailto:dmarc-reports@yourdomain.com

Keep the rua= address. New tools get added over time, and reports are how you'll notice one that wasn't set up. DMARC p=none vs quarantine vs reject explains each policy in more depth.

One Microsoft-specific effect of enforcing: if a message from your domain fails DMARC at its destination while your policy is quarantine or reject, Microsoft 365 routes it through its high-risk delivery pool, a separate set of servers with a lower reputation. Fixing failing senders before you enforce avoids that.

Domains that don't send email

For domains you own but don't use for email, Microsoft recommends going straight to reject. Pair it with an SPF record that authorizes nothing:

Name: _dmarc    Value: v=DMARC1; p=reject;
Name: @         Value: v=spf1 -all

Check that it works

  1. Run your domain through Rigcheck. DMARC should show your current policy, and SPF and DKIM should pass.
  2. Send a message from your Microsoft 365 mailbox to an address at another provider, such as a personal Gmail account. In Gmail, open it, tap the three-dot menu and choose Show original. You should see PASS next to DMARC.
  3. Mail received by Microsoft 365 or Outlook.com carries an Authentication-Results header. Look for dmarc=pass. A result of dmarc=bestguesspass means Microsoft found no DMARC record for the domain.

Other problems

  • Outlook.com rejects your mail with 550 5.7.515. Since May 2025, Outlook.com requires domains sending more than 5,000 messages a day to its users to pass SPF, DKIM and DMARC, with at least p=none. The fix is the same setup covered in this guide.
  • Mail from your own domain lands in Junk with compauth=fail reason=601. Microsoft 365 treated a message from a scanner, app or outside service as spoofing your domain. compauth=fail reason=601 shows how to find what sent it and fix it.
  • A subdomain behaves differently. Subdomains, including ones that don't exist, follow the main domain's record unless they have their own _dmarc record. Each subdomain that sends mail still needs its own SPF and DKIM.

Ready for the next step? Rigcheck reads your current DMARC policy and gives you the exact record for the next stage of the rollout.

Check my setup

Browse all guides