> ## Documentation Index
> Fetch the complete documentation index at: https://help.allthenticate.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Prepare Active Directory for certificate logon

> Set up the LDAP bind account, LDAPS, base DN and user email attributes the Domain Controller Bridge needs, and learn how Active Directory changes affect users.

The Domain Controller Bridge reads users from your domain controller over LDAPS and keeps your Allthenticate organization in step with Active Directory. You can do every step here before the implementation call.

## What the domain controller needs

* A Windows Server domain controller that already holds the users you want to sync.
* **LDAPS enabled** (TCP 636). It's off on a fresh Active Directory Domain Services installation, and the bridge never uses plain LDAP on port 389. To turn it on, see Microsoft's guide to [enable LDAP over SSL](https://learn.microsoft.com/en-us/troubleshoot/windows-server/active-directory/enable-ldap-over-ssl-3rd-certification-authority).
* A **DNS name** for the domain controller that resolves from the bridge host and appears in the LDAPS certificate's Subject or Subject Alternative Name. Don't use an IP address: the Windows build then fails with `The certificate's CN name does not match the passed value. (os error -2146762481)`.
* **Time in sync.** The domain controller, the CA, the bridge host and the computers share a time source and agree within one minute. Kerberos and certificate validation both fail when clocks drift.
* **Strong certificate mapping.** Since February 2025, Microsoft's default for [KB5014754](https://support.microsoft.com/help/5014754) is Full Enforcement: a certificate without the SID extension fails to sign in unless your domain controllers are explicitly set to Compatibility mode. Your CA adds the extension automatically when it has the May 2022 update or later (see [Configure AD CS](https://help.allthenticate.com/windows/active-directory/certificate-services.md)).

## Choose how the bridge binds to LDAP

The bridge authenticates to the domain controller as an **LDAP bind account** that can read the users' organizational unit (OU). It needs no certificate rights. Which method you can use depends on where the bridge runs:

| LDAP authentication | Windows build | Docker (Linux) |
| - | - | - |
| Kerberos (`Gssapi`): the Windows account the bridge runs as | Yes | No |
| NTLM (`Ntlm`): a user name and password | Yes | Yes |

* **Kerberos.** The bridge binds as its own Windows account, so no LDAP password is stored. That account needs read access to the OU. If the bridge runs as NetworkService or LocalSystem, the account is the bridge host's computer account, `DOMAIN\HOST$`. Note the domain controller's fully qualified name (for example `dc01.internal.example.com`): the bridge uses it to find the Kerberos service.
* **NTLM.** Create a standard domain user, for example `svc-allth-ldap`, with read access to the OU and a password that doesn't expire. Use NTLM to keep the LDAP bind on an account without certificate rights, and on any Docker or Linux bridge.

## Collect these values

**1. Domain controller hostname**

Only the hostname, without `ldaps://`, for example `dc01.internal.example.com`. The bridge always connects on port 636; to use another port, append `:port`.

**2. Base DN**

The distinguished name of the OU to sync, copied from **ADSI Edit**, for example `OU=Members,DC=internal,DC=example,DC=com`. Pilot on an OU, not the domain root, and pick one whose parent can become the production scope (see [Change the scope safely](#change-the-scope-safely)). The search is paged, so the domain controller's `MaxPageSize` doesn't limit how many users you can sync.

**3. Group DNs (optional)**

To sync only members of certain Active Directory groups, collect each group's full distinguished name. Nested membership counts. Don't list `Domain Users` or any other group that is someone's primary group: primary groups aren't recorded in `memberOf`, so almost no one matches. To print a group's DN, run:

```powershell theme={null}
(Get-ADGroup 'Allthenticate Users').DistinguishedName
```

The group that holds **Enroll** on your certificate template is a natural choice, so the synced users and the users who can get certificates are the same set.

**4. LDAPS CA certificate (if needed)**

If an internal CA issued the LDAPS certificate, export that CA's certificate (PEM or DER). A Docker bridge needs it, as the root CA certificate, and the domain controller must send the intermediate in its TLS handshake. The Windows build also trusts the Windows certificate store, which on a domain member normally holds your enterprise root already, so there the file is usually unnecessary.

## Prepare the users

* Every user to sync has the **E-mail** attribute (`mail`) filled in. Allthenticate creates and matches each user by that address. Use an all-lowercase address that is unique and on a domain that resolves on public DNS, not `.local`, `.internal` or `.corp`.
* Only user objects are synced. Computers, groups, critical system objects and the `krbtgt*` and `MSOL*` accounts are excluded automatically.
* Disabled accounts are synced too. They can't sign in, because the domain controller rejects them.
* Prepare a test OU with at least one test user whose **E-mail** is filled in.

## How Active Directory changes affect users

The bridge rereads the whole search base every `poll_period` (at most 10 minutes with the recommended setting) and mirrors it into the **DC Sync Group** in your Allthenticate organization. Users are matched only by email address, compared case-insensitively. If two Active Directory accounts share an address, they become one Allthenticate user, with the attributes of whichever comes last in the search.

| Change in Active Directory | Effect on the next poll |
| - | - |
| User disabled | No change. The user keeps their account and certificate, and it keeps renewing. Windows sign-in fails because the domain controller rejects disabled accounts. |
| User deleted, or moved out of the search base | Removed from the DC Sync Group and their Allthenticate account is deleted. The certificate stops renewing but is **not revoked**. |
| User removed from every listed group (with `group_dns`) | Same as deleted. A group held only as the user's primary group doesn't count. |
| `mail` empty | Never synced. The user is invited on the next poll after you fill in **E-mail**. |
| User renamed, same email | No change. |
| Email changed | Treated as a deletion plus a new user. Groups, policies and the certificate don't carry over; the new account gets a new certificate. |
| User restored or moved back into the search base | The existing Allthenticate account is reactivated and re-added to the DC Sync Group. A new certificate is issued if the old one has expired. |

When a user is removed, their whole Allthenticate account is deleted: group memberships, door and computer policies and computer user names go with it, along with any other Allthenticate access they had. Their certificate stays valid until it expires. If access must end at once, also disable or delete the Active Directory account so the domain controller refuses the sign-in, and revoke the certificate on your CA if your policy requires it. Allthenticate keeps a deleted user's directory attributes and certificate records until the Certificate Generation Policy itself is deleted.

> [!WARNING]
>
> **Don't delete or rename the DC Sync Group.** Deleting it also deletes every Certificate Generation Policy attached to it, with all their certificate records, and the admin portal doesn't warn you. It can't be renamed. The sync owns its membership: a user you add by hand is deleted from your organization on the next poll, and a user you remove by hand is added back.

## Change the scope safely

Changing `base_dn` or `group_dns` deletes every synced user who falls outside the new scope on the next poll, with their groups and policies.

* **Widening is safe.** Moving the base DN to a parent of the current OU keeps every synced user inside it. That's the intended way to go from pilot to production.
* **Narrowing deletes users.** So does moving the base DN to a sibling OU, setting `group_dns`, or removing an entry from it.
* **Guards:** Allthenticate ignores a poll that returns no users with an email address, and the bridge holds back a sync that matches no such users or where a `group_dns` entry isn't a group, reporting `sync withheld: …` on the bridge card. Nothing guards against a scope that is valid but narrower than intended.

Change the scope in a maintenance window, then check the user count under **DC Bridging** > **Active Directory Information** in the admin portal.

## Validation checkpoints

Run these before the call. The end-to-end checks (bind and users returned) run once the bridge is up; see [Install the bridge](https://help.allthenticate.com/windows/active-directory/bridge.md#validation-checkpoints).

| Check | How to verify | Expected result |
| - | - | - |
| LDAPS reachable from the bridge host | Windows: `Test-NetConnection dc01.internal.example.com -Port 636`. Linux: `openssl s_client -connect dc01.internal.example.com:636 -servername dc01.internal.example.com`. Use exactly the hostname for the configuration. | `TcpTestSucceeded : True`, or `openssl` prints the certificate chain. A failure means DNS, the firewall, or LDAPS isn't enabled. |
| LDAPS certificate matches the hostname | On a domain-joined computer, open `ldp.exe`, select **Connection** > **Connect**, enter the hostname and port `636`, and select **SSL**. | The connection opens and names the domain controller. |
| CA certificate exported (if needed) | `certutil -dump ca-root.cer` | Its Subject is the CA that issued the LDAPS certificate. |
| Group DNs copied (if used) | The PowerShell command above, per group | Each value matches what goes in `group_dns`, character for character. |
| Test user ready | **Active Directory Users and Computers** > the user > **Properties** > **General** | **E-mail** is filled in and the user is under the base DN. |
| LDAP bind account usable | Sign in once as the account, or check it in **Active Directory Users and Computers** | Enabled, with a known password that hasn't expired. For a gMSA run-as account, `Test-ADServiceAccount gmsa-dcbridge` returns `True` on the bridge host. |

Next: [Configure AD CS](https://help.allthenticate.com/windows/active-directory/certificate-services.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.