Enable LDAP over SSL on a DC with a third-party or Microsoft CA: certificate requirements, a certreq request.inf, certreq -accept, the NTDS service store, renewServerCertificate without a restart and an Ldp.exe test on port 636.
Home › Guides › Enable LDAPS with a third-party CA
Last updated 21 November 2026
There is no user interface for turning on LDAP over SSL (LDAPS). You install a properly formatted certificate on the domain controller, from a Microsoft CA or a non-Microsoft (third-party) CA, and the LDAP service then listens for, and automatically accepts, SSL connections for both LDAP (TCP 636) and global catalog (TCP 3269) traffic. Microsoft's procedure (KB 321051):
request.inf with the DC's FQDN as the subject and the Server Authentication EKU.certreq -new request.inf request.req and submit Request.req to the CA.Certnew.cer and run certreq -accept certnew.cer.| Requirement | Detail |
|---|---|
| Store | The Local Computer Personal store (the computer MY store). If there is a certificate in the NTDS store, the DC uses that one instead. |
| Private key | Present in the Local Computer store and correctly associated with the certificate. It must not have strong private key protection enabled. |
| Enhanced Key Usage | Includes Server Authentication, OID 1.3.6.1.5.5.7.3.1. |
| Name | The Active Directory FQDN of the DC (for example dc01.contoso.com) as the CN in the Subject field or as a DNS entry in the Subject Alternative Name extension. |
| Trust | Issued by a CA that the DC and the LDAPS clients trust, by configuring them to trust the root CA the issuing CA chains to. |
| Key provider | Generate the key with the Schannel cryptographic service provider (CSP). |
Any tool that creates a valid PKCS #10 request works; Microsoft uses Certreq.exe, which reads a text instruction file. Microsoft's sample request.inf:
;----------------- request.inf ----------------- [Version] Signature="$Windows NT$ [NewRequest] Subject = "CN=<DC fqdn>" ; replace with the FQDN of the DC KeySpec = 1 KeyLength = 1024 ; Can be 1024, 2048, 4096, 8192, or 16384. ; Larger key sizes are more secure, but have ; a greater impact on performance. Exportable = TRUE MachineKeySet = TRUE SMIME = False PrivateKeyArchive = FALSE UserProtected = FALSE UseExistingKeySet = FALSE ProviderName = "Microsoft RSA SChannel Cryptographic Provider" ProviderType = 12 RequestType = PKCS10 KeyUsage = 0xa0 [EnhancedKeyUsageExtension] OID=1.3.6.1.5.5.7.3.1 ; this is for Server Authentication ;-----------------------------------------------
Put the fully qualified DNS name of the DC in Subject. Some third-party CAs want more in the subject, such as e-mail (E), OU, O, L, S and C; append them to the CN, for example Subject="E=admin@contoso.com, CN=<DC fqdn>, OU=Servers, O=Contoso, L=Redmond, S=Washington, C=US." Then create the request:
certreq -new request.inf request.req
Request.req is the base64-encoded request. Submit it to a Microsoft CA or a third-party CA (most vendors call the request a Certificate Signing Request, CSR). If clients will reach the DC by an alias such as ldap.contoso.com, add SAN entries to the request (Microsoft's SAN article puts them in the [Extensions] section); otherwise clients that connect by the alias can fail with Schannel event 36884.
Certnew.cer in the same folder as the request, open it in Notepad, paste the encoded certificate and save. It must be base64; some third-party CAs send it as base64 text in an e-mail.certreq -accept certnew.cerThe Local Machine Personal store is still supported, but AD DS looks in the NTDS service's Personal store first. That makes it easier to control which certificate is used when the Local Machine store has several. AD DS notices a new certificate in its store and updates its SSL certificate without restarting AD DS or the DC. To import there (Domain Admins or equivalent):
mmc.For AD LDS, put the certificate in the Personal store of the service that corresponds to the AD LDS instance instead of the NTDS service.
A DC gets its LDAPS certificates from the operating system at startup. An LDAP modify of the rootDSE attribute renewServerCertificate makes it query again, for example if the available certificates have changed since startup; when the operation returns, the certificates it found are available for LDAPS connections. The requester needs the Reload-SSL-Certificate control access right on the DC's nTDSDSA object. The modify can be add or replace and the value doesn't matter. Microsoft's LDIF sample, which you can import with ldifde.exe (or make the same change in adsiedit.msc):
dn: changetype: modify add: renewServerCertificate renewServerCertificate: 1 -
KB 321051 also notes (as a pre-SP3 caching issue) that when an LDAPS certificate is replaced, by renewal or because the issuing CA changed, the server must be restarted for Schannel to use the new one. The NTDS store and renewServerCertificate are the Windows Server 2008 and later ways to update without restarting AD DS or the DC.
ldp; Connection > Connect.636, with SSL selected and Connectionless cleared, and click OK.Cannot open connection means LDAP-over-SSL binding is not configured properly.Until a certificate is in place, LDAPS attempts make the DC log event 1220: LDAP over Secure Sockets Layer (SSL) will be unavailable at this time because the server was unable to obtain a certificate. If it still fails with a certificate installed, see troubleshoot LDAP over SSL connection problems.
| Problem | What Microsoft says |
|---|---|
| Wrong certificate used | Schannel picks the first valid certificate in the local computer store, so with several valid certificates it may pick the wrong one. Use the NTDS store. If a Windows Server 2008 or later DC finds several certificates in its store, it picks one at random. |
| Renewed certificate not used | KB 321051 says the server must be restarted for Schannel to use a replaced certificate (listed as a pre-SP3 issue). On Windows Server 2008 and later, the NTDS store and renewServerCertificate update it without a restart. |
| Enterprise CA on a DC | Installing AD CS as an Enterprise CA on a DC configures all DCs in the forest to accept LDAPS, but in most cases you should not install a CA on a DC; a CA on the DC you connect to can also cause a certificate conflict. |
Look up AD DS 1220 and Schannel 36884 in the Windows Event ID Lookup, copy the certreq -new, certreq -accept and certutil -verifykeys lines from the PowerShell Cheat Sheet, check the Subject line of your request.inf with the Regex Tester, check the subnets of the DCs your LDAPS clients use with the IPv4 Subnet Calculator or IPv6 Subnet Calculator, and identify the network adapter vendor of a DC you are enabling LDAPS on with the MAC Vendor Lookup. Related guides: LDAP over SSL connection problems, LDAPS Schannel event 36884, AD replication error 8453 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.
Install a valid Server Authentication certificate for the DC. There is no user interface for LDAPS: with the certificate in place the LDAP service listens for and automatically accepts SSL connections for LDAP and global catalog traffic.
Yes. Create the request with certreq -new request.inf request.req, submit it to the CA, save the issued certificate as base64 in Certnew.cer and run certreq -accept certnew.cer. The DC and the clients must trust the root CA.
No. The private key must be in the Local Computer store, correctly associated with the certificate, and must not have strong private key protection enabled. Generate the key with the Schannel CSP.
The Local Computer Personal store works, but on Windows Server 2008 and later you can use the NTDS service Personal store. AD DS checks it first and picks up a new certificate there without a restart.
Use the NTDS store, or do an LDAP modify of the rootDSE attribute renewServerCertificate, for example with ldifde or adsiedit. The requester needs the Reload-SSL-Certificate control access right on the DC nTDSDSA object.
Runbooks, checklists and helpdesk templates: IT Admin Packs on Gumroad.