Microsoft 365 detection is not a simple string match: direct mail routing and secondary identity or DKIM signals must be separated.
Start with a classification problem, not a keyword match
For MSP prospecting, "uses Microsoft 365" sounds binary. Public infrastructure is not. A company can route mail directly through Microsoft, place Proofpoint or another secure email gateway in front, publish Microsoft Autodiscover records, use Entra ID for identity, or expose a mixture of signals left over from a migration.
A useful detector therefore separates direct evidence from supporting evidence. The commercial question is whether the observable signals support the classification strongly enough to prioritize an account, not whether the string "Microsoft" appears somewhere in DNS.
Signal 1: direct Microsoft MX
When public MX points directly to recognized Microsoft 365 mail-protection endpoints, it is strong evidence that inbound mail is being routed into Microsoft infrastructure. This is more direct than a TXT record mentioning Microsoft.
dig +short MX example.com
A gateway changes the picture. If MX points to Proofpoint, Mimecast, Hornetsecurity or another provider, the underlying mailbox platform is no longer visible from MX alone. Retain both the gateway observation and the unresolved backend state.
Signal 2: Microsoft Entra ID
Entra ID evidence is valuable but does not prove that the organization uses Microsoft 365 for email. Entra can exist for identity, SSO and mixed application environments. SecuTest deliberately does not conclude Microsoft-hosted mail from identity signals alone.
Signal 3: Autodiscover
A Microsoft-directed Autodiscover record is a useful secondary clue. Behind a gateway, it can help explain the likely mailbox platform. Records can survive migrations, so it is supporting evidence rather than absolute truth.
dig +short CNAME autodiscover.example.com
Signal 4: Microsoft DKIM selectors
Published Microsoft-associated DKIM selectors can add a second independent clue, especially where MX is abstracted by a gateway. Both missing and historical selectors are possible. Treat their presence as context, not a guarantee about every mailbox.
dig +short CNAME selector1._domainkey.example.com
dig +short CNAME selector2._domainkey.example.com
Combine the signals
| Observed pattern | Reasonable classification | Confidence boundary |
|---|---|---|
| Direct Microsoft MX | Microsoft mail routing | Strong routing evidence |
| Gateway + Entra + Microsoft Autodiscover | Microsoft 365 behind gateway | Strong inference, review supporting evidence |
| Gateway + Microsoft DKIM | Possible Microsoft 365 backend | Moderate inference |
| Entra only | Microsoft identity signal | Insufficient for email workspace |
Why this matters to an MSP
M365 may be relevant to backup, migration, licensing, identity management and managed email protection. External signals cannot establish that the prospect needs any of those services. They help the seller choose a technically plausible discovery question.
A responsible opener describes public signals as consistent with an environment, rather than pretending to know an internal configuration. Use Scan Prospects to examine known domains or Find Leads to explore infrastructure-based prospect filters.
Practical verification before exporting
Open the exact MX value behind a Microsoft classification. If the record points to a known secure email gateway, ensure that the workspace label came from independent Microsoft evidence rather than treating the gateway as if it identified the backend. Check Autodiscover, relevant DKIM selectors and identity clues separately, and review contradictions. A domain in migration may have stale entries that support more than one interpretation.
When confidence is low, an honest unknown result is more useful than a false Microsoft 365 label. For MSP sales, this means the first conversation can ask what platform the prospect is operating instead of falsely asserting a technology. Accurate boundaries protect your reputation while keeping the lead commercially usable.
Turn infrastructure signals into a qualified prospect list.
Analyze domains you already know, or find new companies that match the technologies you target. Public DNS observations support discovery, not proof of an internal security weakness.