SPF vs. DKIM vs. DMARC in Microsoft 365 Email Authentication
Question details
Understand how SPF, DKIM, and DMARC authenticate email and work together to reduce spoofing.

- Product
- Microsoft 365 email
- Device & OS
- not provided
- Scenario
- An organization wants to authenticate email sent from its domain and define how receivers handle messages that fail authentication.
- Observed behavior
- SPF checks authorized sending servers, DKIM verifies a message signature, and DMARC applies domain alignment, handling policies, and reporting.
Identify your sending domain, all services that send mail for it, and the administrator account used to manage its DNS records. For a Microsoft 365 custom domain, check that you can access the Microsoft Defender portal and your DNS provider.
Use SPF, DKIM, and DMARC Together for Email Authentication
Use all three mechanisms to authenticate sending sources, verify signed messages, and apply a domain policy.
SPF checks whether the sending server is authorized for the envelope sender domain. DKIM uses a cryptographic signature so receivers can verify that signed message content has not been altered.
DMARC passes when either SPF or DKIM passes and its authenticated domain aligns with the visible From domain. A DMARC policy tells receiving servers how to handle failures and can request reports.
In your DNS provider's dashboard, find the TXT records for your domain. List Microsoft 365 and any other services authorized to send mail before changing SPF.
Edit the domain's existing SPF TXT record to include all authorized sending services. If Microsoft 365 sends mail for the domain, include its SPF mechanism, include:spf.protection.outlook.com, as part of that record; do not publish multiple SPF records for the same domain.
In the Microsoft Defender portal at security.microsoft.com, open Email & collaboration, then Policies & rules, Threat policies, and Email authentication settings. Select DKIM and your custom domain, follow the displayed instructions to add the required DNS records, and enable signing after they are detected.
In your DNS provider's dashboard, add a DMARC TXT record at _dmarc.yourdomain. Start with a monitoring policy such as p=none and configure an aggregate report address you control. Review reports for legitimate senders before moving to p=quarantine or p=reject.
Send a test message to a mailbox where you can view full message headers. Inspect Authentication-Results for SPF, DKIM, and DMARC results, and check whether a passing SPF or DKIM domain aligns with the visible From domain.

Work With Email Security Documents in WPS Office
WPS Office is a free, lightweight alternative for writing security policies and reviewing reports. Its familiar interface and Microsoft Office format compatibility make it easy to move existing documents into your workflow. Email authentication itself must still be configured with your mail provider and DNS host.

Frequently Asked Questions
Does DMARC require both SPF and DKIM to pass?
No. DMARC passes if either SPF or DKIM passes and the authenticated domain aligns with the domain in the visible From address.
Why can SPF fail when an email is forwarded?
The forwarding server may not be authorized by the original sender's SPF record. Check the message's Authentication-Results header; DKIM may still pass if the signed content has not been changed.
Where do I enable DKIM for a Microsoft 365 custom domain?
In the Microsoft Defender portal, go to Email & collaboration > Policies & rules > Threat policies > Email authentication settings > DKIM. Select the domain and follow the instructions to publish its required DNS records before enabling signing.
What does a DMARC policy of p=none do?
It requests monitoring without asking receivers to quarantine or reject messages that fail DMARC. Add an aggregate report address to the DMARC TXT record at _dmarc.yourdomain to review authentication results.
Can I create separate SPF records for each email service?
No. A domain should have only one SPF record. Add the mechanisms for all authorized sending services to the same SPF TXT record in your DNS provider's dashboard.




