LDAPS Connection Fails with Schannel Event 36884: The Certificate Does Not Contain the Expected Name

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

Quick answer

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:

What you see

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).

Why the name doesn't match

Microsoft's scenario, piece by piece:

ItemValue
Certificate Subjectldap.contoso.com
Certificate Subject Alternative Name (SAN)ldap.contoso.com
DNS record 1ldap.contoso.com CNAME myldapserver.contoso.com
DNS record 2myldapserver.contoso.com HOST 10.0.0.1
Name LDAPS looks for in the certificatemyldapserver.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.

Fix 1: add the host names to the certificate SAN

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.

Fix 2: replace the CNAME with a HOST record

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.

Fix 3: make the client compare against the CNAME (UseHostnameAsAlias)

Back up the registry first. On the client computer:

  1. Start Registry Editor.
  2. Go to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LDAP.
  3. Create a REG_DWORD value named UseHostnameAsAlias and set it to anything other than zero.
  4. Exit Registry Editor and restart the computer.

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.

Which fix to pick

FixWhere you change itWhat Microsoft says it does
Extra SAN entriesThe certificate on the LDAPS connection point (new request)Covers the resolved HOST names on the certificate
HOST recordDNSUsed instead of the CNAME record
UseHostnameAsAliasThe client registry, then a restartThe client uses the CNAME for the server name comparison

Still stuck

Related tools and guides

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.

FAQ

What does Schannel event 36884 mean on an LDAPS connection?

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.

Why does LDAPS fail when I connect through a CNAME?

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.

How do I fix event 36884 for LDAPS?

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.

What does UseHostnameAsAlias do?

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.

How do I add a second DNS name to an LDAPS certificate?

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.

Want the full kit?

Runbooks, checklists and helpdesk templates: IT Admin Packs on Gumroad.