LDAPS drops with Schannel event 36884 when the certificate SAN does not cover the host name a CNAME resolves to. Fix it with extra SAN entries, a HOST record or the UseHostnameAsAlias client registry value.
Home › Guides › LDAPS Schannel event 36884
Last updated 21 November 2026
Schannel event 36884 on an LDAPS client means the name the client expected is not in the certificate the LDAP server sent, so the TLS connection is dropped. Microsoft's example: the certificate has Subject and SAN ldap.contoso.com, but in DNS ldap.contoso.com is a CNAME for myldapserver.contoso.com. LDAPS compares the certificate against myldapserver.contoso.com, which no SAN entry covers.
Microsoft gives three fixes; use one of them:
UseHostnameAsAlias registry value so the CNAME is used for the server name comparison.The connection to the LDAPS connection point is dropped and the client logs this in the System log:
Log Name: System Source: Schannel Event ID: 36884 Level: Error Description: The certificate received from the remote server does not contain the expected name. It is therefore not possible to determine whether we are connecting to the correct server. The server name we were expecting is <computer_name>. The TLS connection request has failed. The attached data contains the server certificate. The SSPI client process is ldp (PID: 5148).
The last line names the client process that made the connection; in Microsoft's example it is ldp (Ldp.exe). 36884 is an Error-level event, and Schannel logs error messages by default (the EventLogging default is 0x00000001).
Microsoft's scenario, piece by piece:
| Item | Value |
|---|---|
| Certificate Subject | ldap.contoso.com |
| Certificate Subject Alternative Name (SAN) | ldap.contoso.com |
| DNS record 1 | ldap.contoso.com CNAME myldapserver.contoso.com |
| DNS record 2 | myldapserver.contoso.com HOST 10.0.0.1 |
| Name LDAPS looks for in the certificate | myldapserver.contoso.com (not covered by the SAN entries, so no match and the connection is dropped) |
For a domain controller, the certificate rules in Microsoft's LDAPS troubleshooting article (KB 938703) also apply: the Active Directory fully qualified domain name of the DC must appear either as the common name (CN) in the Subject field or as a DNS entry in the SAN extension.
Microsoft's article on adding a SAN to a secure LDAP certificate (KB 931351) explains that the SAN lets you connect to a domain controller by a DNS name other than the computer name. If the DC is corpdc1.fabrikam.com and the alias is ldap.fabrikam.com, both names must be in the SAN. In a web enrollment request (http://<servername>/certsrv, Advanced certificate request, request format CMC) type them in the Attributes box:
san:dns=corpdc1.fabrikam.com&dns=ldap.fabrikam.com
Separate multiple DNS names with an ampersand (&). Things to know about the CA:
With Certreq.exe, put the SANs in the [Extensions] section of Request.inf, then:
certreq -new request.inf certnew.req certreq -submit -config "corpca1.fabrikam.com\Corporate Policy CA1" certnew.req certnew.cer certreq -retrieve RequestID certnew.cer certreq -accept certnew.cer
-config takes computername\Certification Authority Name; without it you are prompted to pick the CA. You only need -retrieve (with the Request ID from the submit output) when the request was pending. certreq -accept installs the certificate and links it to the private key created by certreq -new. For the full LDAPS certificate requirements and the request.inf sample, see enable LDAPS with a third-party CA certificate.
Microsoft's second option is to use a HOST record in DNS instead of the CNAME record, that is, instead of ldap.contoso.com CNAME myldapserver.contoso.com in the example.
Back up the registry first. On the client computer:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LDAP.REG_DWORD value named UseHostnameAsAlias and set it to anything other than zero.After that, the client uses ldap.contoso.com to make the match. That name is covered by the certificate SANs, so the connection is allowed. Microsoft documents it as a registry value on the client, not on the server.
| Fix | Where you change it | What Microsoft says it does |
|---|---|---|
| Extra SAN entries | The certificate on the LDAPS connection point (new request) | Covers the resolved HOST names on the certificate |
| HOST record | DNS | Used instead of the CNAME record |
| UseHostnameAsAlias | The client registry, then a restart | The client uses the CNAME for the server name comparison |
EventLogging (REG_DWORD) under HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL to 0x0007 to log informational and success events, warnings and errors, then restart (logging doesn't take effect until the restart). The full value table is in troubleshoot LDAP over SSL connection problems.HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\ldap\Tracing\ldp.exe (the process you want to trace), run logman create trace "ds_ds" -ow -o c:\ds_ds.etl -p "Microsoft-Windows-LDAP-Client" 0x18180380 0xff -nb 16 16 -bs 1024 -mode Circular -f bincirc -max 4096 -ets (flag 0x18180380 is for connection establishment problems), reproduce, then logman stop "ds_ds" -ets and netsh trace convert input=c:\ds_ds.etl output=LDAP_CLIENT-formatted.txt.Look up Schannel 36884 and AD DS 1220 in the Windows Event ID Lookup, copy the certreq and certutil lines from the PowerShell Cheat Sheet, pull the expected server names out of exported Schannel events with the Regex Tester, check the subnet of the LDAPS server address your DNS records point to with the IPv4 Subnet Calculator or IPv6 Subnet Calculator, and identify the network adapter vendor of an LDAPS client with the MAC Vendor Lookup. Related guides: LDAP over SSL connection problems, enable LDAPS with a third-party CA certificate, Group Policy event 1006 (LDAP bind failed) and common AD replication errors.
Every AD replication error code with its cause and fix: common Active Directory replication errors.
The certificate received from the LDAP server does not contain the name the client expected, so Schannel cannot tell whether it is connecting to the correct server and fails the TLS connection. The event also names the client process, for example ldp.
LDAPS compares the certificate against the host name the CNAME resolves to. In Microsoft's example ldap.contoso.com is a CNAME for myldapserver.contoso.com, the certificate SAN only has ldap.contoso.com, so there is no match and the connection is dropped.
Use one of Microsoft's three fixes: add SAN entries so the certificate covers the resolved host names, use a HOST record in DNS instead of the CNAME, or set the UseHostnameAsAlias registry value on the client.
It is a REG_DWORD under HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LDAP on the client. Set to anything other than zero, followed by a restart, it makes the client use the CNAME (such as ldap.contoso.com) for the server name comparison.
Include both names in the SAN of the request, for example san:dns=corpdc1.fabrikam.com&dns=ldap.fabrikam.com in the web enrollment Attributes box, or in the Extensions section of a Certreq request.inf. On an enterprise CA the template must take the SAN from the request.
Runbooks, checklists and helpdesk templates: IT Admin Packs on Gumroad.