The TXT record format ms=msXXXXXXXX
(where X
represents a digit) is exclusively used by Microsoft for domain ownership verification. This mechanism confirms administrative control of a domain when integrating with Microsoft services like:
- Office 365 tenant setup
- Azure AD configuration
- Exchange Online deployment
- Microsoft 365 service provisioning
Here's how such a record appears in DNS zone files (BIND format):
example.com. 3600 IN TXT "ms=ms97284866"
For programmatic DNS verification (Python using dnspython):
import dns.resolver def verify_ms_txt(domain): try: answers = dns.resolver.resolve(domain, 'TXT') for rdata in answers: if "ms=ms" in rdata.strings[0]: return rdata.strings[0].decode() except dns.resolver.NoAnswer: return None print(verify_ms_txt("example.com")) # Output: "ms=ms97284866"
- Microsoft generates a unique verification code during service setup
- Admin creates the TXT record containing the
ms=ms[code]
value - Microsoft's DNS checker validates record existence
- Verification persists even after initial setup for periodic revalidation
Error | Solution |
---|---|
Propagation delay | Wait 48 hours max, check with dig +short txt example.com |
Case sensitivity | Ensure exact case match (all lowercase) |
Quotation marks | Some DNS providers auto-add quotes - verify raw output |
When working with domain configurations, you may encounter TXT records in the format ms=msXXXXXXXX
where X represents a decimal digit (0-9). These are specifically Microsoft domain verification records used to prove ownership of a domain when setting up Microsoft services.
These records typically appear when configuring:
- Microsoft 365 (Office 365) tenant setups
- Azure Active Directory domain verification
- Exchange Online deployments
- SharePoint Online custom domains
Here's how to create such a record via DNS management interfaces:
# Example using Azure CLI
az network dns record-set txt add-record \
--resource-group my-resource-group \
--zone-name example.com \
--record-set-name @ \
--value "ms=ms97284866" \
--ttl 3600
Or via PowerShell:
# PowerShell example for adding Microsoft verification
Add-DnsServerResourceRecord -ZoneName "example.com" -TXT
-Name "@" -DescriptiveText "ms=ms97284866" -TimeToLive 01:00:00
Microsoft's systems periodically check for this record to confirm domain ownership. The verification typically follows this flow:
- Microsoft generates a unique verification string
- Admin adds TXT record to domain's DNS
- Microsoft DNS queries verify existence
- Domain marked as verified in Microsoft services
If verification fails:
- Wait for DNS propagation (up to 72 hours)
- Verify exact record format (case-sensitive)
- Check for trailing spaces in the record value
- Ensure TTL is set appropriately (300+ seconds)