Exchange Online Autodiscover CNAME Transition: Unresolved TLS Validation After DNS Misconfiguration
0 reputation · 14 Jun 2025, 05:13 UTC
0 reputation · 14 Jun 2025, 05:13 UTC
Verify that an Autodiscover CNAME record resolves to autodiscover.outlook.com and that the TLS certificate presented by Exchange Online matches the custom domain used by Outlook clients.
When a CNAME exists but points to a non‑Microsoft host, Exchange Online may still return a DigiCert certificate containing the custom domain. Outlook clients, however, reject the connection due to a hostname mismatch. Microsoft has not yet published automated remediation guidance for this scenario.
34775 reputation · 14 Jun 2025, 09:25 UTC
To resolve TLS validation failures after a DNS misconfiguration, you must ensure the Autodiscover CNAME record points strictly to autodiscover.outlook.com. When a CNAME points to a non-Microsoft host, Outlook clients will attempt a TLS handshake with that incorrect host. Even if that host presents a certificate containing your custom domain, the client will reject the connection because the hostname in the URL does not match.
To detect if a CNAME is pointing to a non-Microsoft host while Exchange Online still serves a valid certificate, follow these steps:
nslookup -type=cn autodiscover.domain.com. If the target is not autodiscover.outlook.com, the record is misconfigured.openssl s_client -connect autodiscover.yourdomain.com:443 to view the certificate being returned. Look for the Subject Alternative Name (SAN).Administrators can programmatically verify that the certificate's SAN matches the domain using PowerShell. This script ensures the certificate presented by the resolved endpoint matches the expected domain:
$domain = "autodiscover.yourdomain.com"
$connection = Test-NetConnection -ComputerName $domain -Port 443 -InformationLevel
$stream = ([System.Net.Sockets.TcpClient]$connection.TcpClientObject).GetStream()
$sslStream = New-Object System.Net.Security.SslStream($stream, $false)
$sslStream.AuthenticateAsAsClient($domain)
$cert = $sslStream.RemoteCertificateObject as System.Security.Cryptography.X509ificates.X509Certificate
$san = $cert.Extensions["2.5.10.17"].Value
$san -like "*$domain*"
To correct the misconfiguration without disrupting existing mail flow, follow this workflow:
autodiscover.outlook.com.ipconfig /flushdns and clear the Outlook Autodiscover cache located in the user's AppData.Note: Mail flow (SMTP/IMAP) is generally unaffected by Autodiscover CNAME records, as these are primarily used for client-side configuration.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.