About Active Directory (on-prem)
Active Directory (AD) is Microsoft’s on-premises directory service used to manage users, groups, and resources across an organization. Connecting Active Directory to Serval enables automated user provisioning, group management, and access control directly from your service desk workflows.What the Active Directory integration enables
| Capability | Description |
|---|---|
| User Management | Search, create, modify, and deactivate AD user accounts |
| Group Management | Search groups, list members, add and remove users from groups |
| Access Management | Automate group-based access provisioning and deprovisioning |
| Directory Sync | Automatically sync AD users and groups into Serval |
| Custom Operations | Create, modify, and delete arbitrary directory entries |
Active Directory Configuration
1. Create a Service Account
Create a dedicated service account in Active Directory for Serval. This account will be used to bind (authenticate) to your directory.- Open Active Directory Users and Computers
- Create a new user in an appropriate OU (e.g.,
OU=ServiceAccounts)- Example:
CN=svc-serval,OU=ServiceAccounts,DC=corp,DC=example,DC=com
- Example:
- Set a strong password and configure the account so the password does not expire
- Grant the account read access to the OUs containing your users and groups
- If you need Serval to manage group membership (add/remove users), grant write access to the relevant group objects
2. Determine Your Connection Details
You’ll need the following information from your AD environment:| Detail | Example | How to find it |
|---|---|---|
| Server URL | ldaps://dc01.corp.example.com:636 | Your domain controller’s hostname or IP |
| Base DN | DC=corp,DC=example,DC=com | Your domain’s root distinguished name |
| Bind DN | CN=svc-serval,OU=ServiceAccounts,DC=corp,DC=example,DC=com | The full DN of the service account created in step 1 |
| Bind Password | — | The service account password |
3. Choose a Connection Method
Serval supports two connection methods, both encrypted by default:| Method | URL scheme | Default port | How it works |
|---|---|---|---|
| LDAPS (recommended) | ldaps:// | 636 | TLS is established immediately on connect |
| StartTLS | ldap:// | 389 | Connects on the plain LDAP port, then upgrades to TLS |
By default, all connections require TLS (minimum TLS 1.2). When you use
ldap://, Serval automatically upgrades the connection via StartTLS.Allow Plaintext LDAP
If your environment cannot support TLS (e.g. certificate issues) and the connection is already secured at the network layer (VPN or tunnel), you can enable the Allow plaintext LDAP toggle in the integration configuration. This skips the StartTLS upgrade forldap:// connections.
Using a Custom CA Certificate
Most on-premises Active Directory environments use certificates signed by an internal Certificate Authority (CA). Since Serval’s worker won’t trust your internal CA by default, you need to provide the CA certificate so it can verify the domain controller’s identity during the TLS handshake.Finding Your CA Certificate
There are several ways to obtain the CA certificate, depending on what you have access to. Option 1: From the domain controller (simplest) Run this on the domain controller or any domain-joined machine withcertutil available:
openssl from any machine with network access
If you can reach the domain controller over the network but aren’t on a domain-joined Windows machine:
Converting to PEM Format
Serval requires the certificate in PEM format (a text file starting with-----BEGIN CERTIFICATE-----). If you have a certificate in DER (binary) format instead, convert it:
Windows:
Verifying the Certificate
Before entering the certificate into Serval, confirm it completes a TLS handshake with your domain controller:Verify return code: 0 (ok) in the output. If you see a verification error, the certificate may be incorrect or incomplete (e.g., missing an intermediate CA).
If LDAPS Is Not Enabled on Your Domain Controller
If your domain controller doesn’t have LDAPS enabled (port 636 is not listening), you’ll need to provision a server certificate for it before configuring the Serval integration. Common approaches:- Active Directory Certificate Services (AD CS): Install the AD CS role and configure auto-enrollment. Domain controllers will automatically request and install LDAPS certificates.
- Manual certificate enrollment: Request a certificate from your internal CA with the domain controller’s FQDN as the subject, and install it in the domain controller’s personal certificate store.
- Third-party CA: Obtain a certificate from an external CA for the domain controller’s FQDN and install it.
Generating a self-signed certificate for LDAPS is not recommended. Active Directory clients and Serval both need to trust the issuing CA, and distributing self-signed trust is error-prone. Use your organization’s internal CA instead.
Serval Configuration
- In Serval, navigate to Apps → Available → Active Directory (on-prem) → Connect
-
Enter the following information:
Field Description Server URL Your domain controller URL (e.g., ldaps://dc01.corp.example.com:636)Base DN The root DN for your domain (e.g., DC=corp,DC=example,DC=com)Bind DN The full DN of your service account Bind Password The service account password CA Certificate (Optional) PEM-encoded CA certificate for verifying the LDAP server’s TLS certificate - Click Save
You should now be able to build workflows that manage Active Directory users, groups, and access.
How It Works
The Active Directory integration runs on your self-hosted worker. When a workflow executes an AD action:- The worker’s LDAP proxy retrieves the stored connection credentials
- A TLS connection is established to your domain controller (LDAPS or StartTLS), unless plaintext LDAP is explicitly enabled
- The proxy binds using your service account credentials
- The requested LDAP operation is executed
- Results are returned to your workflow
Troubleshooting
”Connection refused” or “No route to host”
The worker cannot reach the domain controller:- Verify the domain controller hostname/IP is correct
- Confirm the correct port is open (636 for LDAPS, 389 for StartTLS/LDAP)
- Check firewall rules between the worker host and the domain controller
- Test connectivity from the worker host:
telnet dc01.corp.example.com 636
”TLS handshake failure” or “Certificate verification failed”
The worker cannot verify the domain controller’s TLS certificate:- If your DC uses an internal CA, provide the CA certificate in the configuration (see Using a Custom CA Certificate above)
- Ensure the certificate is in PEM format (starts with
-----BEGIN CERTIFICATE-----) - Verify the certificate hasn’t expired:
openssl x509 -in ca.pem -noout -dates - Check that the certificate’s subject or SAN matches the hostname in your Server URL
- If your CA has intermediate certificates, include the full chain in the CA Certificate field
- Verify the certificate works from the worker host:
“How do I know which certificate to use?”
If you’re unsure which certificate to provide, inspect the certificate chain your domain controller presents:”Invalid credentials” or “Bind failed”
The service account credentials are incorrect:- Verify the Bind DN is the full distinguished name (not just the username)
- Confirm the password is correct — test with
ldapsearchfrom the worker host: - Check if the account is locked or disabled in AD
”No such object” or empty search results
The Base DN doesn’t match your directory structure:- Verify the Base DN matches your domain’s root (use
(Get-ADDomain).DistinguishedNamein PowerShell) - If searching for users in a specific OU, check that the OU path is correct
”Insufficient access rights”
The service account lacks permissions for the requested operation:- For read operations, ensure the account has read access to the target OUs
- For group membership changes, delegate write access on the group objects
- For password resets, delegate the “Reset Password” permission on user objects
Need help? Contact support@serval.com for assistance with your Active Directory integration.

