---
title: SSL/LDAPS Configuration for Active Directory - Certificate Setup Guide
description: Secure LDAP communication with SSL/LDAPS for Active Directory. Install certificates on domain controllers and clients, configure port 636 connections for the Nodinite LDAP Web API and BizTalk LDAP Adapter, and manage certificates.
---

# Securing LDAP using SSL

Secure your directory integrations by enabling SSL/LDAPS for LDAP communication. This guide shows you how to encrypt and trust connections between :Nodinite: LDAP products and your LDAP Catalog Service, so you achieve compliance and peace of mind.

✅ Encrypt all LDAP traffic for maximum security  
✅ Follow proven certificate management best practices  
✅ Achieve compliance with enterprise and regulatory requirements  
✅ Use with both [BizTalk LDAP Adapter][] and [LDAP Web API][]  

>This user guide applies to both :Nodinite: LDAP products: [BizTalk LDAP Adapter][] and [LDAP Web API][]. It explains how to secure communication between the :Nodinite: LDAP products and your LDAP Catalog Service.

## :fa-network-wired: Understanding LDAPS

LDAPS (LDAP over SSL/TLS) encrypts LDAP communication using SSL/TLS certificates. When properly configured:

* LDAP traffic uses **port 636** (instead of standard LDAP port 389)
* All communication uses encryption end-to-end
* Certificate validation ensures you're connecting to the correct domain controller

Two certificate stores take part: the domain controller presents its server certificate from its **Personal** store, and the server running the LDAP product trusts it through the CA certificates in its **Trusted Root** (and **Intermediate**) store.

<div class="mermaid">
graph LR
    subgraph "Certificate Authority"
        roCA["fa:fa-certificate Enterprise or public CA"]
    end
    subgraph "LDAP Client Server"
        roClient["fa:fa-cloud-arrow-up LDAP Web API or BizTalk LDAP Adapter"]
        roTrust["fa:fa-shield-halved Trusted Root and Intermediate CA store"]
    end
    subgraph "Domain Controller"
        roDC["fa:fa-address-book Active Directory - NTDS"]
        roCert["fa:fa-certificate Server certificate<br/>Personal store, FQDN, Server Authentication EKU"]
    end
    roCA -->|"issues"| roCert
    roCA -->|"root and intermediate certificates"| roTrust
    roCert --> roDC
    roClient -->|"LDAPS, TCP 636"| roDC
    roTrust -.->|"validates certificate chain"| roClient
</div>

*Diagram: the CA issues the domain controller's server certificate and the client server trusts the same CA, so the LDAP product can validate the certificate when it connects on port 636.*

### :fa-puzzle-piece: Key Components

|Component|Where|Role|Requirement|  
|---|---|---|---|  
|Server certificate|Domain controller, **Local Computer → Personal**|Proves the domain controller's identity and encrypts the session|Subject or SAN matches the DC's FQDN; EKU includes **Server Authentication**; private key present|  
|Root and intermediate CA certificates|LDAP client server, **Trusted Root** and **Intermediate Certification Authorities**|Lets the client validate the server certificate's chain|The full chain up to a trusted root|  
|NTDS service|Domain controller|Picks up the certificate and listens for LDAPS on 636|Restart or reboot after installing the certificate|  
|Connection settings|[LDAP Web API][Configuration] or [BizTalk LDAP Adapter][BizTalk LDAP Adapter Configuration]|Tells the LDAP product to connect over LDAPS|`DSAServer` is the FQDN, `DSAServerPort` is **636**|  

### :fa-code-compare: LDAP vs LDAPS

||LDAP|LDAPS|  
|---|---|---|  
|Port|389|636|  
|Traffic|❌ Not encrypted (unless signing/sealing is used)|✅ Encrypted with TLS|  
|Certificate needed|❌ No|✅ Yes, on every domain controller you connect to|  
|Server identity check|❌ No|✅ Yes, the certificate name must match `DSAServer`|  

>[!NOTE]
>This guide focuses on Active Directory. Other LDAP services (ADAM/LDS, DirX, etc.) have similar requirements but may use different certificate stores or configuration methods.

The firewall must allow TCP 636 from the LDAP client server to each domain controller; see the firewall section in the [Prerequisites][] for every port the LDAP products use.

## Configuration Steps

### Step 1: Install Certificate on Domain Controllers

On **each Active Directory Domain Controller** that clients will connect to:

1. **Obtain a certificate** with the following requirements:

   * **Subject or Subject Alternative Name (SAN)**: Must match the Domain Controller's **Fully Qualified Domain Name (FQDN)**
   * **Enhanced Key Usage (EKU)**: Must include **Server Authentication** (OID 1.3.6.1.5.5.7.3.1)
   * **Private key**: Must be installed with the certificate; make it exportable if you install the same certificate on multiple DCs
   * **Certificate Authority**: Use your enterprise CA or a trusted public CA

   >[!WARNING]
   >Self-signed certificates work for testing but are **not recommended for production**. Use certificates from your enterprise Certificate Authority or a trusted public CA for production environments.

2. **Install the certificate**:

   * Open `certlm.msc` (Local Computer Certificates) on the Domain Controller
   * Navigate to **Personal → Certificates**
   * Import or request the certificate (ensure the private key is imported)
   * Verify the certificate appears in the **Personal\Certificates** store for the computer account

3. **Restart the NTDS service** or reboot the Domain Controller:

   ```powershell
   Restart-Service NTDS -Force
   ```

4. **Verify LDAPS is enabled**:

   * Use `ldp.exe` (included with Windows Server)
   * Connection → Connect → Server: `dc.yourdomain.com`, Port: `636`, SSL: **checked**
   * You should successfully connect over LDAPS

### Step 2: Install Certificate on LDAP Client Servers

On the server(s) running the [BizTalk LDAP Adapter][] and/or [LDAP Web API][]:

1. **Export the root certificate** from your Certificate Authority or Domain Controller

2. **Install on the client server**:

   * Open `certlm.msc` (Local Computer Certificates)
   * Navigate to **Trusted Root Certification Authorities → Certificates**
   * Right-click → **All Tasks → Import**
   * Select the root certificate file
   * Complete the import wizard

3. **For certificates with intermediate CAs**:

   * Install the **root certificate** in **Trusted Root Certification Authorities**
   * Install **intermediate certificates** in **Intermediate Certification Authorities**
   * See [Understanding Root and Intermediate Certificates][]<sup>:fa-arrow-up-right-from-square:</sup> for more details

4. **Verify certificate chain**:

   * Double-click the imported certificate
   * Check the **Certification Path** tab
   * Ensure the chain shows "This certificate is OK"

5. **Restart services or reboot** if required

### Step 3: Configure the Connection for LDAPS

Both LDAP products connect with a server host name and a port. Point the connection at the domain controller's FQDN and port **636**:

|Product|Host name setting|Port setting|Where|  
|---|---|---|---|  
|[LDAP Web API][]|`DSAServer`|`DSAServerPort`|Per connection in the settings file, see [Configuration][]|  
|[BizTalk LDAP Adapter][]|`DSAServerName`|`Port`|Send port **Connection Info**, SSO Application, or context properties, see [BizTalk LDAP Adapter Configuration][]|  

The examples below show the LDAP Web API settings file.

#### Before (Unencrypted LDAP)

```json
{
  "DSAServer": "WILDWESTAD01",
  "DSAServerPort": 389
}
```

#### After (LDAPS)

```json
{
  "DSAServer": "wildwestad01.wildwest.local",
  "DSAServerPort": 636
}
```

>[!TIP]
>When using LDAPS, certificate validation is automatic. Ensure the certificate's Subject Name or SAN matches the host name (`DSAServer` or `DSAServerName`) to avoid validation errors. Review the `AuthenticationType` flags, such as **SecureSocketsLayer**, in the [Configuration][] guide.

## Troubleshooting

### LDAPS Connection Fails

* **Check certificate validity**: Use `certlm.msc` to verify the certificate hasn't expired
* **Verify port 636 is open**: Use `Test-NetConnection -ComputerName dc.yourdomain.com -Port 636` from the client server; see [TCP and UDP ports][] for more port tests
* **Check certificate chain**: Ensure all intermediate and root certificates are properly installed
* **Review Event Logs**: Check Windows Event Viewer → **System** and **Directory Services** logs on the Domain Controller

### Certificate Validation Errors

* **Hostname mismatch**: The certificate's Subject Name or SAN must match the FQDN in `DSAServer`
* **Trust chain broken**: Verify all intermediate certificates are installed in the correct store
* **Certificate expired**: Replace with a new certificate before the expiration date

## Certificate Management Best Practices

* **Use enterprise CA**: Leverage your organization's Certificate Authority for centralized management
* **Plan for renewal**: Set reminders to renew certificates at least 30 days before expiration
* **Monitor certificate health**: Use :Nodinite: [Monitoring Agents][] to alert on expiring certificates
* **Document your configuration**: Keep records of which certificates are deployed where
* **Test in non-production**: Always validate certificate changes in dev/test environments first

## References

* [How to enable LDAP over SSL with a third-party certificate authority][]<sup>:fa-arrow-up-right-from-square:</sup> - Microsoft Learn
* [Understanding Root and Intermediate Certificates][]<sup>:fa-arrow-up-right-from-square:</sup> - SSL Store

>[!IMPORTANT]
>Always use certificates to secure communication. Replace certificates before they expire or become obsolete.

## :fa-hand-point-right: Next Steps

Monitor your certificates so you replace them before they expire:

* :fa-globe: [Web Service Certificates][Web Services Agent]  
* :fab fa-windows: [Windows X.509 Certificates][Windows Server Monitoring Agent]  
* :fa-cloud: [Azure Subscription Certificates][Azure Agent]  

## :fa-link-horizontal: Related Topics

* :fa-monitor-waveform: :Nodinite: [Monitoring Agents][]  
* :fa-square-plus: [Prerequisites][] - firewall and ports  
* :fa-shield-halved: [HTTPS Hardening][]  
* :fa-gear: [Configuration][]  

[Azure Agent]:{ndr}/Logging%20and%20Monitoring/Azure/Overview.md
[BizTalk LDAP Adapter]:{ndr}/BizTalk%20LDAP%20Adapter/Overview.md
[BizTalk LDAP Adapter Configuration]:{ndr}/BizTalk%20LDAP%20Adapter/Getting%20started/3.%20Configuration.md
[Configuration]:{ndr}/LDAP%20Web%20API/Getting%20started/3.%20Configuration.md
[How to enable LDAP over SSL with a third-party certificate authority]:https://learn.microsoft.com/en-us/troubleshoot/windows-server/active-directory/enable-ldap-over-ssl-3rd-certification-authority
[HTTPS Hardening]:{ndr}/LDAP%20Web%20API/Troubleshooting/HTTPS%20Hardening%20your%20environment.md
[LDAP Web API]:{ndr}/LDAP%20Web%20API/Overview.md
[Monitoring Agents]:{ndr}/Administration/2.%20Monitor%20Management/2.%20Monitor%20Agents/Features/What%20is%20a%20Monitor%20Agent.md
[Prerequisites]:{ndr}/LDAP%20Web%20API/Getting%20started/1.%20Prerequisites.md
[TCP and UDP ports]:{ndr}/LDAP%20Web%20API/Troubleshooting/TCP%20and%20UDP%20ports.md
[Understanding Root and Intermediate Certificates]:https://www.thesslstore.com/blog/root-certificates-intermediate/
[Web Services Agent]:{ndr}/Logging%20and%20Monitoring/Web%20Services/Overview.md
[Windows Server Monitoring Agent]:{ndr}/Logging%20and%20Monitoring/Windows%20Server/Overview.md