The SPF record for Microsoft 365, the versions for government and China clouds, and how to add other senders.
The SPF record for Microsoft 365
v=spf1 include:spf.protection.outlook.com -all
Add it as a TXT record at the root of your domain (name @). Microsoft’s own guidance ends the record with -all, which tells inboxes to reject email from anyone not listed. If you’re still finding all your senders, ~all is the safer choice until you are sure.
Government and China clouds
The include above is for standard Microsoft 365. Microsoft 365 for US government (GCC High and DoD) uses include:spf.protection.office365.us, and Microsoft 365 operated by 21Vianet in China uses include:spf.protection.partner.outlook.cn.