Skip to main content
logo logo
Source Guide: Microsoft 365

Source Guide: Microsoft 365

Technical Guidance

This source guide describes the process for configuring Microsoft 365 to send  DMARC-compliant messages. You will need to configure this source, and others that send on your behalf, before advancing your DMARC policies to a more restrictive state (eg. quarantine and/or reject).

To bring this source into DMARC compliance, you will need access to Microsoft 365’s administrative account and the domain’s DNS management console.

From time to time, these instructions change with very little advance notice. Please always refer to documentation published by Microsoft 365 for the most complete and accurate information.

General information
Microsoft 365 provides cloud-based mailbox email service, as well as a suite of tools and utilities. It is likely managed by IT and utilized by all departments in your organization. Microsoft 365 supports DMARC compliance through SPF and DKIM alignment.

SPF
To configure  SPF, add the following entry to your sending domain’s SPF record:

For Exchange online (common), add: include:spf.protection.outlook.com

For Exchange Online dedicated only (not common), add:

  • ip4:23.103.224.0/19
  • ip4:206.191.224.0/19
  • ip4:40.103.0.0/16
  • include:spf.protection.outlook.com

For Microsoft 365 Germany, Microsoft Cloud Germany only (not common), add: include:spf.protection.outlook.de

Reference:  Microsoft 365’s SPF instructions

DKIM
There are two ways to enable  DKIM for Microsoft 365: from within the user interface (UI) or using PowerShell.

To configure DKIM:

  • Determine sending domain to enable DKIM signing (example.com)
  • Retrieve DNS (CNAME) records to publish
  • Publish CNAME records to DNS zone of sending domain
  • Confirm published DNS records have propagated
  • Enable DKIM signing (from UI or via Powershell)

Method 1: Microsoft UI
Step 1: Click on the domain you wish to configure DKIM on the DKIM page (https://security.microsoft.com/dkimv2 or https://protection.office.com/dkimv2).

Step 2: Slide the toggle to Enable. You will see a pop-up window stating that you need to add CNAME records.

Step 3: Copy the CNAMEs shown in the pop up window

Step 4: Publish the copied CNAME records to your DNS service provider. On your DNS provider’s website, add CNAME records for DKIM that you want to enable. Make sure that the fields are set to the following values for each:

Record Type: CNAME (Alias)
Host: Paste the values you copy from DKIM popup.
Points to address: Copy the value from DKIM popup.
TTL: 3600 (or your provider default)

Step 5: Return to the DKIM page to enable DKIM.

If you still see the “Client Error CNAME record doesn’t exist” error, it might be due to synchronization with the DNS server, which might take seconds to hours to resolve. If the problem persists, repeat the steps again and check for any copy/paste errors, like additional spaces or tabs.

Method 2: PowerShell

Step 1: Connect to Exchange Online PowerShell

Step 2: Run the following commands in Exchange Online PowerShell to create the selector records:

New-DkimSigningConfig -DomainName <domain> -Enabled $false
Get-DkimSigningConfig -Identity <domain> | Format-List Selector1CNAME, Selector2CNAME

If you have provisioned custom domains in addition to the initial domain in Microsoft 365, you must publish two CNAME records for each additional domain. For example, if you have two domains, you must publish two additional CNAME records, and so on.

Step 3: Use the following format for the CNAME records:

Host name: selector1._domainkey
Points to address or value: selector1-<customDomainIdentifier>._domainkey.<initialDomain>
TTL: 3600

Host name: selector2._domainkey
Points to address or value: selector2-<customDomainIdentifier>._domainkey.<initialDomain>
TTL: 3600

Example:

Host name: selector1._domainkey
Points to address or value: selector1-example-com._domainkey.example.onmicrosoft.com
TTL: 3600

Host name: selector2._domainkey
Points to address or value: selector2-example-com._domainkey.example.onmicrosoft.com
TTL: 3600

For Microsoft 365, the selectors will always be “selector1” or “selector2”

customDomainIdentifier is the same as the customDomainIdentifier in the customized MX record for your custom domain that appears before mail.protection.outlook.com. For example, in the following MX record for the domain contoso.com, the customDomainIdentifier is contoso-com:

contoso.com. 3600 IN MX 5 contoso-com.mail.protection.outlook.com

initialDomain is the domain that you used when you signed up for Microsoft 365. Initial domains always end in onmicrosoft.com.

Note: It’s important to create the second record, but only one of the selectors may be available at the time of creation. In essence, the second selector might point to an address that hasn’t been created yet. We still recommend that you create the second CNAME record, so your key rotation will be seamless.

Step 4: Once you have published the CNAME records in DNS, you are ready to enable DKIM signing through Microsoft 365. You can do this either through the Microsoft 365 admin center or by using PowerShell.

Use the following PowerShell syntax:

Set-DkimSigningConfig -Identity <Domain> -Enabled $true

Example:

Set-DkimSigningConfig -Identity example.com -Enabled $true

Reference:  Microsoft 365’s DKIM instructions


If you have a dmarcian account, it may take a few days to see these changes reflected in the dmarcian platform. You can look in the  Detail Viewer (shown below) to check SPF and DKIM  alignment required for DMARC.

dmarcian detail viewer screenshot for source guides

We’re Here to Help
With a team of email security experts and a mission of making email and the internet more trustworthy through domain security, dmarcian is here to help assess an organization’s domain catalog and implement and manage DMARC for the long haul.

Get started with our 30-day trial

Want to continue the conversation? Head over to the dmarcian Forum.

两个鬼故事公司起名常用词男孩起名离骚吕字起名免费按生辰八字起名打分想起我的名字了吗起个双胞胎名字2020缺火女宝起名当民国大佬姨娘暴富后西安限行公司新年寄语alook浏览器大侠卢小鱼之夕阳红战队在线观看bestgore2021免费八字起名周易功夫麻将无法拥抱的你电视剧独特好听姓王男孩起名央视4套在线直播上海东亚展览馆程姓女孩子起名八字缺木的女孩起名饰公司起名孟美岐个人资料介绍圣斗士星矢国语版全集七十年代学霸甏肉干饭加盟罗儿童起名2019张姓男孩起名大全九斗鱼文件怎么一起重命名少年生前被连续抽血16次?多部门介入两大学生合买彩票中奖一人不认账让美丽中国“从细节出发”淀粉肠小王子日销售额涨超10倍高中生被打伤下体休学 邯郸通报单亲妈妈陷入热恋 14岁儿子报警何赛飞追着代拍打雅江山火三名扑火人员牺牲系谣言张家界的山上“长”满了韩国人?男孩8年未见母亲被告知被遗忘中国拥有亿元资产的家庭达13.3万户19岁小伙救下5人后溺亡 多方发声315晚会后胖东来又人满为患了张立群任西安交通大学校长“重生之我在北大当嫡校长”男子被猫抓伤后确诊“猫抓病”测试车高速逃费 小米:已补缴周杰伦一审败诉网易网友洛杉矶偶遇贾玲今日春分倪萍分享减重40斤方法七年后宇文玥被薅头发捞上岸许家印被限制高消费萧美琴窜访捷克 外交部回应联合利华开始重组专访95后高颜值猪保姆胖东来员工每周单休无小长假男子被流浪猫绊倒 投喂者赔24万小米汽车超级工厂正式揭幕黑马情侣提车了西双版纳热带植物园回应蜉蝣大爆发当地回应沈阳致3死车祸车主疑毒驾恒大被罚41.75亿到底怎么缴妈妈回应孩子在校撞护栏坠楼外国人感慨凌晨的中国很安全杨倩无缘巴黎奥运校方回应护栏损坏小学生课间坠楼房客欠租失踪 房东直发愁专家建议不必谈骨泥色变王树国卸任西安交大校长 师生送别手机成瘾是影响睡眠质量重要因素国产伟哥去年销售近13亿阿根廷将发行1万与2万面值的纸币兔狲“狲大娘”因病死亡遭遇山火的松茸之乡“开封王婆”爆火:促成四五十对奥巴马现身唐宁街 黑色着装引猜测考生莫言也上北大硕士复试名单了德国打算提及普京时仅用姓名天水麻辣烫把捣辣椒大爷累坏了

两个鬼故事 XML地图 TXT地图 虚拟主机 SEO 网站制作 网站优化