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

# Troubleshoot Active Directory certificate logon

> Look up Domain Controller Bridge log messages, admin portal errors, CA error codes and domain controller events for certificate logon, with the cause and fix.

Bridge log lines come from `logs\dc-bridge.log` in the bridge folder on Windows, or `docker compose logs -f dc-bridge` in Docker. After a service restart, the previous run's output is in `logs\dc-bridge.1.log`. Rows that apply to one enrollment path name it: web enrollment (CES) or native enrollment (WCCE).

## Bridge exit codes

| Code | Cause | What to do |
| - | - | - |
| 0 | First run: no configuration existed, so the bridge wrote placeholders and stopped. Or `--test-error-reporting` succeeded. | Fill in `dc-bridge-config.json` and `.env`, then start again. |
| 1 | Startup listed configuration errors under `dc-bridge failed to start due to the following configuration error(s):`. Or the error-reporting test couldn't reach the service, or reporting is off. | Fix every listed error. |
| 2 | The error-reporting test was reached but rejected; or the command line has an unknown option. | Nothing to fix on your side for the test; tell Allthenticate. Otherwise `--help` lists the options. |
| 101 | Startup stopped while reading the configuration or `.env`, before the checks ran. A scheduled task shows `0x65`. | Fix the problem in the message just before the exit. |

A restart doesn't fix codes 0, 1 or a startup 101; fix the configuration first.

## Windows service

`sc.exe query dc-bridge` and the System event log (source **Service Control Manager**) say why Windows didn't start the service.

| Symptom | Cause | Fix |
| - | - | - |
| `access denied; run this from an elevated PowerShell` | `service install` and `service uninstall` need elevation. | Run them elevated. |
| `the dc-bridge service is already installed: …` | The service exists. | Run `service uninstall` first to change the account or paths. |
| `… is marked for deletion; close services.msc …` | A window still holds the service open after an uninstall (error 1072). | Close `services.msc` and retry. |
| `WIN32_EXIT_CODE : 1066` with `SERVICE_EXIT_CODE : 1` | Configuration errors; the log has the full list. | Fix them and run `Start-Service dc-bridge`. |
| `WIN32_EXIT_CODE : 1066` with `SERVICE_EXIT_CODE : 101` | The configuration is missing or invalid, or `.env` lacks a variable. The service never writes placeholders. | Fix the file the log names. Windows retries after 60 seconds. |
| Event 7024 says `The exclusive semaphore is owned by another process` or `Incorrect function` | How Windows renders codes 101 and 1. | Read the log. |
| Event 7000 with `Access is denied` | `NT SERVICE\dc-bridge` can't read the executable. | Keep `dc-bridge.exe` in the bridge folder, or grant the service identity read and execute where it lives. |
| Event 7023 with `Access is denied` (`WIN32_EXIT_CODE : 5`) | The service can't enter the folder or write `logs\`. | Grant `NT SERVICE\dc-bridge` read and execute on the folder and modify on `logs\`, as install does. |
| Event 7000 or 7041, logon failure (error 1069) | The gMSA lost **Log on as a service** to a Group Policy that defines that right, or the host can't retrieve the gMSA's password. | Add the gMSA to that Group Policy; check `Test-ADServiceAccount` returns `True`. |
| Event 7031 | The bridge crashed. Windows restarts it after 60 seconds. | Send `logs\dc-bridge.1.log` to Allthenticate. |
| `Start-Service` fails with error 1053 | The service wasn't created by `service install`, for example with `sc.exe create`, NSSM or WinSW. | Remove it (`sc.exe delete dc-bridge`), then run `service install`. |
| No `dc-bridge.1.log` after a restart | Something held the log open, so the new run appended to it. | Close editors or `Get-Content -Wait` before the next start. |

## Startup and configuration

| Message | Cause | Fix |
| - | - | - |
| `failed to parse dc-bridge-config.json: …` | JSON syntax: an unquoted placeholder, a trailing comma, `id` as a string, a single backslash (`invalid escape at line N column M`), or a key given twice (`duplicate field wcce`). | Write `id` as a number and each backslash twice; replace the placeholder's `"wcce": null` line rather than adding a second `wcce`. |
| `failed to read <path>: …` (exit code 101) | `dc-bridge-config.json` exists, but the account the bridge runs as can't read it. | Let that account read the file. |
| `Missing required environment variable(s): …` | A name in an `_env` field isn't in `.env`. After switching to `Ntlm`, `LDAP_PASSWORD` is needed. | Add each variable, single-quoting values with special characters. |
| `… is a directory, not a file` (Docker) | The file didn't exist when the container first started, so Docker created a directory. | `docker compose down`, remove the directory, create the file, `docker compose up -d`. |
| `Failed to verify password against key archive` | The PFX password in `.env` is wrong, or unquoted and altered by `$`, `#`, `\` or spaces. | Correct it as `NAME='password'`, or re-export the PFX. |
| `No certificate with enrollment agent EKU found in pfx`, `Expected 1 key in pfx, found 0` or `Expected 1 key in pfx, found multiple` | The wrong certificate was exported, without its private key, or with more than one key. | Export the enrollment agent certificate with its key, one per PFX. |
| `Expected at least 1 cert in pfx, found 0` (after `ces: failed to load CES client certificate from <path>:`) | The CES client-authentication PFX holds a key but no certificate. | Export the client certificate together with its private key. |
| `ces: failed to load CES CA certificate from <path>: …` or `ldap: failed to load LDAP CA certificate from <path>: …` | The file in `ces.ca_cert_path` or `ldap.ca_cert_path` can't be read or isn't a certificate; for the latter the message adds `<path> is neither valid PEM nor valid DER`. | Point it at the CA certificate as PEM or DER, not `.p7b`, readable by the run-as account. |
| `failed to decrypt the PFX's AuthenticatedSafe` | Unsupported export options. | Re-export with `AES256-SHA256` and without **Group or user names**. |
| `wcce: failed to load enrollment agent certificate: … (os error 2)` or `(os error 3)` | `agent_pfx_path` names a missing file (2) or folder (3). Relative paths resolve from the working directory. | Fix the path, doubling backslashes. |
| `cannot open the private key` with `does not give <account> Read`, or `Keyset does not exist` | With `agent_cert_stores`, the run-as account or `NT SERVICE\dc-bridge` can't read the key, or the key is missing. | Grant **Read** on the key. |
| `failed to parse .env: Access is denied. (os error 5)` or `failed to write placeholder config: … Access is denied.` | The account can't read the locked bridge folder, so it can't see the configuration and treats the start as a first run. Not a missing configuration. | Run as the account the folder grants, from an elevated PowerShell for a console run. Don't create a new configuration. |
| `ces: ces.url … uses scheme http, but only https … is allowed` | `ces.url` isn't `https://`. `backend_url` fails the same way with the prefix `bridge:`. | Use the `https://` URL. |
| `ldap: requested_fields must include mail …` | `mail` missing from `requested_fields`. | Add it. |
| `ldap: group_dns[N] is not a distinguished name` or `is empty` | A display name or blank entry in `group_dns`. | Use each group's full DN. |
| `ldap: GSSAPI authentication is only supported on Windows!` | `Gssapi` in Docker or Linux. | Use `Ntlm`. |
| `enrollment: set only one of ces or wcce, not both` | Both blocks are set. | Delete `ces` or set it to `null`. |
| `wcce: native WCCE (ICertRequest2 over DCOM) enrollment is only supported on Windows; …` | WCCE in Docker or Linux. | Run the Windows build, or use CES. |
| `wcce: ca_config …` | The value isn't `HOST\CA name` as `certutil` prints it: a URL, a missing or doubled backslash, an empty part, spaces, or a control character from a single backslash before `b`, `f`, `n`, `r` or `t`. | Copy the `Config:` value without quotes and double the backslash in JSON. |
| `wcce: period must be at least 1 second` | `period` is 0. | Set it to 1 or more. |

## Connection to Allthenticate

These appear only in the bridge log, every poll; nothing shows in the admin portal.

| Message | Cause | Fix |
| - | - | - |
| `backend returned 403 Forbidden for GET /dccsrs` or `POST /dcldapupdate` | Wrong or empty bridge secret. | Enter the secret from registration. If it's lost, delete and re-register the bridge. |
| `backend returned 404 Not Found …` | `bridge.id` doesn't match a bridge, for example the placeholder `9999999` or a re-registered bridge. | Set `id` to the number after `#` on the bridge card. |
| `network error polling pending CSRs` (and similar `network error …` lines) | The bridge can't reach `api.allthenticate.com`. | Allow outbound TCP 443, or set `HTTPS_PROXY` in `.env`. |
| `cgr <id>: failed to submit signed certificate, will retry next poll: …` | The CA issued the certificate but the bridge couldn't deliver it. Each retry enrolls again, so the CA may issue extras. | Fix the named problem; revoke unwanted extras in **Issued Certificates**. |
| `malformed JSON polling CSRs`, `backend rejected request body`, `failed to un-b64ify CSR pem` | Allthenticate's side. | Send the bridge log to Allthenticate. |
| `Failed to report LDAP error: …` | The bridge couldn't put an LDAP error on the bridge card. | Fix both the LDAP error logged before it and the reporting error named in the line. |

## Error reporting test

| Message (after `--test-error-reporting`) | Cause | Fix |
| - | - | - |
| `error reporting is not active, nothing to send` (exit code 1) | `error_reporting` is `false`. | Skip the check, or set it to `true`. |
| `test event could not reach <host> within 10s: …` (exit code 1) | Name resolution, a firewall or a proxy blocks `o576446.ingest.us.sentry.io`. | Allow outbound TCP 443 to that host, or set `HTTPS_PROXY` in `.env`. |

## LDAP and sync

| Symptom | Cause | Fix |
| - | - | - |
| `Failed to connect to LDAP: failed to connect: …` | DNS, firewall, or LDAPS not enabled. | Check `Test-NetConnection <dc> -Port 636` and enable LDAPS. |
| `Failed to connect to LDAP: failed to parse LDAP URL: …` | `ldap.url` isn't a host name with an optional port, for example the placeholder `[YOUR LDAP URL HERE]` or a value with `ldaps://`. | Set the domain controller's host name as its LDAPS certificate names it. |
| `Failed to connect to LDAP: failed to build TLS connector: …` | The bridge couldn't set up TLS with the certificate in `ldap.ca_cert_path`. | Point `ldap.ca_cert_path` at the CA certificate in PEM or DER form. |
| `Failed to query LDAP: …` | The directory search failed: `base_dn` doesn't exist, the connection dropped between polls, or a search reply took longer than 180 seconds. The bridge reconnects at the next poll. | Check `base_dn`. If only every other poll fails, set `poll_period` to `600` or less. |
| `failed to look up group_dns: …` | With `group_dns` set, checking the listed groups failed, for the same reasons as `Failed to query LDAP`. Nothing is synced that poll. | As above. For groups in another domain, see [Multi-domain forests](https://help.allthenticate.com/windows/active-directory/configuration.md#multi-domain-forests). |
| TLS errors: `certificate verify failed` (Docker) or `native TLS error: …` (Windows), including `The certificate's CN name does not match the passed value` | `ldap.url` isn't a name in the LDAPS certificate (an IP or alias), or nothing trusts the issuing CA. | Use the exact hostname, and set `ldap.ca_cert_path` to the issuing CA's certificate. |
| `Failed to connect to LDAP: failed to bind: …` | The bind was rejected or failed. NTLM: wrong name format or password, or a locked, expired or disabled account. Kerberos: no route to a domain controller on port 88, a wrong `fqdn`, or the wrong run-as account. A failed bind every `poll_period` can lock out the account. | Use `user@domain`, the current password, and unlock the account; or fix Kerberos reachability and `fqdn`. |
| `sync withheld, these group_dns entries are not groups in the directory: …` | A group DN is mistyped, renamed or moved. Nothing is sent, so no one is removed. | Correct `group_dns` and restart. |
| `sync withheld: the LDAP query matched no users with a mail attribute` | Wrong base DN, users outside the listed groups, or no **E-mail**. | Fix the scope or fill in **E-mail**. |
| Bound, but **Active Directory Information** stays empty with no error | Base DN spelling, users outside the subtree, `mail` unset, or with Kerberos, the run-as account can't read the OU. The startup line `LDAP sync scope base_dn=… groups=…` shows what the bridge searches. | Copy the DN from ADSI Edit; fill in **E-mail**; wait one `poll_period`. |
| A user in the OU is never invited | `mail` is empty. | Fill in **E-mail** and wait one `poll_period`. |
| A request stays **CSR Created** forever with no error | `sAMAccountName` missing from `requested_fields` or unset on the user, so signing is never attempted; or (CES) the template pends requests. | Add `sAMAccountName`; make the template issue automatically. |
| A user is synced but no request appears | The user isn't in the policy's group, the phone hasn't been online since the policy was created, or they already hold a valid certificate. | Fix the group, bring the phone online, or use **Mark for reissue**. |
| A user signed in for months, then can't | Renewal starts at 45 days left and needs the phone online; an offline phone past expiry can't sign in, and no one is notified. | Bring the phone online; a new request is created within minutes. |

## Certificate authority errors

Errors from AD CS appear on the policy card, on one request row, or on the bridge card. A **policy** error holds back every request under it until dismissed with its **×**; a **request** error holds back that user; a **bridge card** error only reports and may reappear. After a policy error, the bridge stops that poll's batch and continues at the next poll.

| Message | Where | Cause | Fix |
| - | - | - | - |
| `Certificate template not found on the CA` (`0x80094800`) | Policy card | The policy has the display name, or the template isn't published. | Enter the **Template name**; publish the template; dismiss the error. |
| `Public key too small for certificate template` (`0x80094811`) | Policy card | Template cryptography doesn't match the key type. | Set **Key Storage Provider**, **ECDH\_P521**, minimum 521. |
| `User lacks enrollment rights`, with `Denied by Policy Module` (CES) | Request row | The user's group lacks **Enroll** on the template. | Grant **Enroll** to the group; dismiss the error. |
| `Unknown error`: `The CA denied Enroll on this policy's template (0x80094012) … The bridge runs as <account>` (WCCE) | Policy card | The run-as account (or `DOMAIN\HOST$`) lacks **Read** and **Enroll** on the template. | Grant them, `Restart-Service certsvc`, give the bridge a fresh logon, dismiss the error. |
| `Unknown error`: `The CA pended request <id> for certificate manager approval …` (WCCE) | Policy card | The template or policy module pends requests. | Clear **CA certificate manager approval**, make the policy module follow the template, deny request `<id>` in **Pending Requests**, dismiss. |
| `Unknown error`: `the CA issued request <id> out of band …` or `… could not read the certificate` (WCCE) | Request row | The CA issued a certificate the bridge couldn't collect. | Revoke it in **Issued Certificates** if unwanted, then dismiss; the request is offered again. |
| Request denied with `0x80094009` | Request row | The CA's enrollment agent restriction denies that user. | Leave it, or allow the user's group in the restriction and dismiss. |
| `CA connection error` with `0x800706ba` (RPC server unavailable) (WCCE) | Bridge card | TCP 135 or the dynamic RPC ports blocked, a wrong host in `ca_config`, or a logon without network credentials (LocalService, **Do not store password**, a key-based SSH session). If the port test passes and the error is immediate, check the logon first. | Open RPC directly to the CA, or run the bridge as a gMSA or NetworkService service. |
| `CA connection error` with `0x80070005` (access denied) (WCCE) | Bridge card | The **Certificate Service DCOM Access** group doesn't admit the account. | Add it, restart Certificate Services, give the bridge a fresh logon. |
| `CA connection error` with `0x80094011` | Bridge card | The account lacks **Request Certificates** on the CA. | Grant it, restart Certificate Services, give the bridge a fresh logon. |
| `CA connection error`: `CoInitializeEx failed` or `CoCreateInstance(CCertRequest)` | Bridge card | COM failed on the bridge host itself; the CA wasn't reached. | Send the log to Allthenticate. |
| `enrollment failed: CES fault: …` with an IIS page mentioning `401 - Unauthorized` or `403 - Forbidden` (CES) | Bridge card | Authentication type, password or client certificate don't match CES. | Match `ces.auth.type` to the URL suffix and fix the credentials. |
| `enrollment failed: error sending request for url (…)`, or `CES fault: ` with nothing after it (CES) | Bridge card | DNS, port, or a wrong path (IIS answers an empty 404). | Copy the URL from IIS, including `/service.svc/CES`. |
| `invalid peer certificate` or `UnknownIssuer` (CES) | Log | `ces.ca_cert_path` isn't the CA that issued the CES site certificate, or it's a `.p7b`. | Export the issuing CA certificate with `certutil -ca.cert ca.cer`. |
| Error mentioning `NTAuth` or an untrusted chain | Bridge card | The issuing CA isn't in the enterprise NTAuth store (`certutil -viewstore -enterprise NTAuth`). | Run `certutil -dspublish -f ca.cer NTAuthCA`, then `gpupdate /force` on the domain controller. |

On the bridge card, LDAP failures appear under the heading **LDAP connection error** and CA failures under **CA connection error**, each with **may reappear if the issue persists**. The card holds one error, so a later one replaces it. A CA connection error's text begins `could not submit to the CA (0x…): …` or `the CA did not issue the certificate (disposition N, name, 0x…): …`, without `, 0x…` when the CA gave no code. Over WCCE the disposition is `0, incomplete`, `1, error`, `2, denied` or `6, revoked`. With CES, `cgr <id>: enrollment failed: unexpected CES response: …` means CES answered with success but sent no certificate the bridge could read; send the bridge log to Allthenticate.

CES reports CA faults as negative decimal codes:

| CES `ErrorCode` | Windows code | Meaning | Shown over CES | Shown over WCCE |
| - | - | - | - | - |
| `-2146877422` | `0x80094012` | **Enroll** denied on the template | `User lacks enrollment rights` on the request | `Unknown error` on the policy, naming the run-as account |
| `-2146875392` | `0x80094800` | The CA doesn't issue the template | `Certificate template not found on the CA` on the policy | The same |
| `-2146875375` | `0x80094811` | Key shorter than the template's minimum | `Public key too small for certificate template` on the policy | The same |
| `-2146877423` | `0x80094011` | No **Request Certificates** on the CA | CA error on the bridge card with the CA's reason | `CA connection error` naming the run-as account |
| Any other, for example `-2147023545` | `0x80070547` | The CA couldn't read its configuration from a domain controller, although the reason says `Denied by Policy Module` | CA error on the bridge card | `CA connection error` with the code |

The WCCE message on the bridge card ends with `The bridge runs as <account>.` when Windows can name the account. Under NetworkService or LocalSystem that's `DOMAIN\HOST$`; under a virtual service account, the CA sees `DOMAIN\HOST$` whatever the line shows.

## Windows sign-in

Domain controller events are in **Event Viewer** > **Windows Logs** > **System**, source `Kerberos-Key-Distribution-Center`.

> [accordion] No Allthenticate tile on the sign-in screen
>
> Check that the phone is paired with this computer, connected over Bluetooth, and holds the certificate (**Certificate Distributed**), that the account exists in this domain, and that you locked or signed out after installing. The tile never appears in UAC or **Run as** prompts. If the Allthenticator app was reinstalled, or its data cleared on Android, the phone no longer has the certificate: select **Mark for reissue**.

> [accordion] The phone never gets the approval request
>
> Check Bluetooth range and that the adapter supports the Bluetooth Low Energy peripheral role, and start the **Bluetooth Support Service** with **Startup type** set to **Automatic**. See [Bluetooth problems](https://help.allthenticate.com/windows/troubleshooting/bluetooth.md).

> [accordion] The admin portal's Logs page shows a failed Certificate Logon
>
> The row's reason says why: **Timeout** means no one answered on the phone; **Denied** means the request was refused or the computer has no active policy; **Device Not Connected** means no phone was connected or it disconnected. **Show Errors** filters by **Timeout Errors**, **Denial Errors** and **Device Not Connected**.

> [accordion] Event ID 39: sign-in fails after approving
>
> The certificate has no SID extension (`1.3.6.1.4.1.311.25.2`) and no explicit mapping, usually because the CA lacks the KB5014754 update. Update the CA (May 2022 or later), then **Mark for reissue**. Domain controllers have enforced strong mapping since September 2025.

> [accordion] Event ID 40
>
> The certificate was issued before the account existed. **Mark for reissue**.

> [accordion] Event ID 41
>
> The SID in the certificate doesn't match the account, for example because the account was re-created. **Mark for reissue**; the new certificate carries the current SID.

> [accordion] A smart card or Kerberos error before the phone is asked
>
> The domain controller needs its own certificate from the **Kerberos Authentication** or **Domain Controller** template, issued by a CA the client trusts. Enroll it for **Kerberos Authentication**, then restart it.

> [accordion] A revocation error
>
> The CA's CRL or OCSP responder must be reachable from both the domain controller and the computer. Publish the CRL at the location in the certificate's CRL Distribution Points and open the firewall.

> [accordion] The certificate chain isn't trusted for logon
>
> Check that the issuing CA is in NTAuth (`certutil -viewstore -enterprise NTAuth`). If not, run `certutil -dspublish -f ca.cer NTAuthCA`, then `gpupdate /force` on the domain controller.

## Admin portal

| Message | Cause | Fix |
| - | - | - |
| `Failed to load bridges`: `Something went wrong while loading your bridges. Please try again.` | The portal couldn't load the bridge list. Admins without the **Super Admin** role always see loading errors on **DC Bridging**. | Select **Retry**, or sign in as a Super Admin. |
| `Unable to delete bridge. <n> certificate generation policies reference this bridge.` | Policies still use the bridge. | Delete those policies on **Certificate Generation Policies**, then delete the bridge. |
| **CSR Created** with `No certificate issued yet` that never changes | Nothing has issued the certificate yet. | Check the policy card and the bridge card for errors. |

A policy error shows **retry resumes sending certificate requests under this policy**, and a request error shows **retry regenerates this certificate**: dismissing it with its **×** retries.

## Send logs to Allthenticate

* **Bridge on Windows:** send `logs\dc-bridge.log` (and `dc-bridge.1.log` after a restart) from the bridge folder, read from an elevated PowerShell. With WCCE it contains the `ca_config` and the run-as account.
* **Bridge in Docker:** `docker compose logs --since 24h dc-bridge > bridge.log`. It contains account names and your domain controller's hostname, but no passwords.
* **Windows computer:** in the desktop app, select **About** > **View Logs** > **Submit logs**, at most once a minute. It uploads the service log, the sign-in component logs, the computer name and Windows version, and the desktop app log from every user profile.

Then email [help@allthenticate.com](mailto:help@allthenticate.com).


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