LDAPS to a domain controller fails on port 636: check the Server Authentication certificate, chain and private key with certutil, multiple certificates, test with Ldp.exe, read events 1220 and 36884 and turn on Schannel logging.
Home › Guides › LDAPS connection problems
Last updated 21 November 2026
When LDAP over SSL (LDAPS) to a domain controller fails, Microsoft's troubleshooting article (KB 938703) has five steps:
1.3.6.1.5.5.7.3.1, the private key present, and a chain that is valid on the client.Event 1220 on the DC means it could not obtain a certificate for LDAPS; Schannel 36884 on the client means a name mismatch (see the 36884 guide).
LDAPS uses TCP 636; LDAPS to a global catalog server uses TCP 3269. On those ports SSL/TLS is negotiated before any LDAP traffic is exchanged. There is no user interface for configuring LDAPS: installing a valid certificate on a DC makes the LDAP service listen for, and automatically accept, SSL connections for both LDAP and global catalog traffic. Besides LDAP over SSL, LDAP clients can issue the StartTLS command; Windows updates KB5014668 and KB5014665 (released 6/21/2022) added TLS 1.3 support for both.
1.3.6.1.5.5.7.3.1.certutil -verifykeys.Serverssl.cer, copy it to the client and run:certutil -v -urlfetch -verify serverssl.cer > output.txt
Open Output.txt and search for errors.
In some cases LDAPS uses a Client Authentication certificate if one is available on the client. If there is one, it must have the Client Authentication EKU 1.3.6.1.5.5.7.3.2, its private key must be available on the client (certutil -verifykeys), and its chain must be valid on the DC: export it on the client to Clientssl.cer, copy it to the server, run the same certutil -v -urlfetch -verify command there with the output sent to Outputclient.txt, and search that file for errors.
Schannel (the Microsoft SSL provider) selects the first valid certificate it finds in the Local Computer store. With several valid certificates there, it may not select the correct one. Microsoft also warns of a conflict with a CA certificate when the CA is installed on the DC you are trying to reach over LDAPS.
The way out on Windows Server 2008 and later: put the LDAPS certificate in the NTDS service's Personal store. AD DS looks for certificates there before the Local Machine store, picks up a new certificate dropped into it without a restart, and makes it easier to control which certificate is used. If a DC finds multiple certificates in its store, it chooses one at random. The import steps are in enable LDAPS with a third-party CA certificate.
ldp (Run as administrator).636, clear Connectionless, select SSL and click OK.Cannot open connection means LDAP-over-SSL binding is not configured properly.If it fails, read the errors Ldp.exe shows and check the Event Viewer logs.
| Event | Where | Meaning |
|---|---|---|
| 1220 (DIRLOG_LDAP_SSL_NO_CERT) | DC, source Microsoft-Windows-ActiveDirectory_DomainService | LDAP over Secure Sockets Layer (SSL) will be unavailable at this time because the server was unable to obtain a certificate. Logged when clients try LDAPS but SSL is not enabled on the directory. |
| 36884 | Client, System log, source Schannel | The certificate received from the remote server does not contain the expected name. |
For 1220, either give AD DS a certificate (see the enable guide) or, if you don't want to support LDAPS, find the clients that are trying to make LDAPS connections.
On both the server and the client, back up the registry, then open HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL, set the EventLogging REG_DWORD to one of these values and restart (logging doesn't take effect until the restart). The values combine: errors 0x0001 plus warnings 0x0002 gives 0x0003.
| Value | Logs |
|---|---|
| 0x0000 | Nothing |
| 0x0001 | Error messages (the default) |
| 0x0002 | Warnings |
| 0x0003 | Warnings and error messages |
| 0x0004 | Informational and success events |
| 0x0005 | Informational and success events and error messages |
| 0x0006 | Informational and success events and warnings |
| 0x0007 | Informational and success events, warnings and error messages (all levels) |
The events go to the System log. Schannel event logging is not the same as Schannel debug logging, which needs the checked version of Schannel.dll.
If you need to disable TLS 1.3 for LDAP for compatibility reasons, Microsoft documents these values (back up the registry first):
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NTDS\Parameters, REG_DWORD LdapDisableTLS1.3 = 1 (0 = enabled, the default). Restart the Active Directory Domain Services service.HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LDAP, REG_DWORD DisableTLS1.3 = 1. It takes effect at the next LDAP connection.Windows can trace LDAP client activity, including TLS, with ETW:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\ldap\Tracing\<ProcessName> with the full process name, for example ldp.exe. An optional DWORD PID limits tracing to one process ID. Without a subkey for at least one process, the trace is empty.0x18180380 is for connection establishment problems (0x1A59AFA3 covers most needs, 0x1bddbf73 is verbose):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 logman stop "ds_ds" -ets netsh trace convert input=c:\ds_ds.etl output=LDAP_CLIENT-formatted.txt
Reproduce the failure between the start and stop commands.
Look up AD DS 1220 and Schannel 36884 in the Windows Event ID Lookup, copy the certutil -verifykeys, certutil -verify and logman lines from the PowerShell Cheat Sheet, search certutil -verify output for errors with the Regex Tester, check the client and DC subnets for TCP 636 and 3269 with the IPv4 Subnet Calculator or IPv6 Subnet Calculator, and identify the network adapter vendor of a client whose LDAPS connection fails with the MAC Vendor Lookup. Related guides: LDAPS Schannel event 36884, enable LDAPS with a third-party CA certificate, Group Policy event 1006 (LDAP bind failed) and common AD replication errors.
Hardening LDAP on the domain controllers? See LDAP signing and channel binding (events 2887 and 2889).
Every AD replication error code with its cause and fix: common Active Directory replication errors.
TCP 636 for LDAP over SSL and TCP 3269 for LDAPS to a global catalog server. On those ports SSL/TLS is negotiated before any LDAP traffic is exchanged.
The DC FQDN as the Subject CN or a SAN DNS entry, the Server Authentication EKU 1.3.6.1.5.5.7.3.1, a private key available on the DC (check with certutil -verifykeys), and a chain that is valid on the client.
Run ldp, choose Connection and Connect, type the host name, port 636, select SSL and clear Connectionless. RootDSE output means it works; Cannot open connection means LDAP over SSL binding is not configured properly.
DIRLOG_LDAP_SSL_NO_CERT: LDAP over SSL will be unavailable at this time because the server was unable to obtain a certificate. Clients tried LDAPS but SSL is not enabled on the directory. Add a certificate, or find the clients if you do not want LDAPS.
Set the EventLogging REG_DWORD under HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL, for example 0x0007 for all levels, and restart. The default 0x0001 logs only errors. Events go to the System log.
Runbooks, checklists and helpdesk templates: IT Admin Packs on Gumroad.