Settings Ldap
Operations about LDAP settings
Retrieve the current LDAP configuration, including every field exposed in the UI. The binding admin password is redacted on read. Requires the ldap:manage scope and the LDAP feature to be licensed.
Operation successful.
Full LDAP configuration. Every field is returned by GET; send the full object back as PUT body.
Whether LDAP login is enabled.
falseLabel shown on the LDAP login button.
LDAPLDAP server URL.
ldap://ldap.example.comWhether to allow unauthorized (self-signed) certificates.
falseTLS/SSL security mode for the LDAP connection.
nonePossible values: LDAP server port.
389Base DN for LDAP search queries.
dc=example,dc=comDN of the LDAP admin user for binding.
cn=admin,dc=example,dc=comPassword for the LDAP admin user. Redacted on GET; returns the blanking placeholder when a password is stored, empty string when unset. Send the blanking placeholder from a prior GET to keep the stored password unchanged.
LDAP attribute mapped to the user's first name.
givenNameLDAP attribute mapped to the user's last name.
snLDAP attribute mapped to the user's email.
mailLDAP attribute used for login (usually the same as emailAttribute).
mailLDAP attribute that uniquely identifies a user.
uidAdditional LDAP filter to apply when searching for users. Use an empty string for no additional filter.
(objectClass=inetOrgPerson)Whether automatic LDAP synchronization is enabled.
falseInterval in minutes between automatic synchronizations. Ignored if synchronizationEnabled is false.
60Number of LDAP entries to fetch per search page.
1000LDAP search timeout in seconds.
60Whether to enforce that email addresses are unique across LDAP users. When true, if two users have the same email, only the first will be imported.
trueWhether an LDAP user may be linked to an existing n8n account that has the same email. When false, login and synchronization skip such users. Optional on PUT; the stored value is kept when omitted.
trueUnauthorized
Forbidden
GET /api/v1/settings/ldap HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Accept: */*
{
"loginEnabled": false,
"loginLabel": "LDAP",
"connectionUrl": "ldap://ldap.example.com",
"allowUnauthorizedCerts": false,
"connectionSecurity": "none",
"connectionPort": 389,
"baseDn": "dc=example,dc=com",
"bindingAdminDn": "cn=admin,dc=example,dc=com",
"bindingAdminPassword": "text",
"firstNameAttribute": "givenName",
"lastNameAttribute": "sn",
"emailAttribute": "mail",
"loginIdAttribute": "mail",
"ldapIdAttribute": "uid",
"userFilter": "(objectClass=inetOrgPerson)",
"synchronizationEnabled": false,
"synchronizationInterval": 60,
"searchPageSize": 1000,
"searchTimeout": 60,
"enforceEmailUniqueness": true,
"linkExistingAccountsByEmail": true
}Replace the LDAP configuration with the provided full object (partial updates are not supported). For bindingAdminPassword, submit the blanking placeholder from a prior GET to keep the stored password unchanged. Requires the ldap:manage scope and the LDAP feature to be licensed. Setting loginEnabled to false is destructive and it deletes all stored LDAP user identities and disables synchronization.
Full LDAP configuration. Use empty strings for unset fields.
Whether LDAP login is enabled. Setting this to false is destructive — it deletes all stored LDAP user identities and disables synchronization.
falseLabel shown on the LDAP login button.
LDAPLDAP server URL.
ldap://ldap.example.comWhether to allow unauthorized (self-signed) certificates.
falseTLS/SSL security mode for the LDAP connection.
nonePossible values: LDAP server port.
389Base DN for LDAP search queries.
dc=example,dc=comDN of the LDAP admin user for binding.
cn=admin,dc=example,dc=comPassword for the LDAP admin user. To keep an existing password unchanged, submit the blanking placeholder from a prior GET response. Use an empty string to clear the password.
LDAP attribute mapped to the user's first name.
givenNameLDAP attribute mapped to the user's last name.
snLDAP attribute mapped to the user's email.
mailLDAP attribute used for login (usually the same as emailAttribute).
mailLDAP attribute that uniquely identifies a user.
uidAdditional LDAP filter to apply when searching for users. Use an empty string for no additional filter.
(objectClass=inetOrgPerson)Whether automatic LDAP synchronization is enabled.
falseInterval in minutes between automatic synchronizations. Ignored if synchronizationEnabled is false.
60Number of LDAP entries to fetch per search page.
1000LDAP search timeout in seconds.
60Whether to enforce that email addresses are unique across LDAP users. When true, if two users have the same email, only the first will be imported.
trueWhether an LDAP user may be linked to an existing n8n account that has the same email. When false, login and synchronization skip such users. Optional on PUT; the stored value is kept when omitted.
trueOperation successful.
Full LDAP configuration. Every field is returned by GET; send the full object back as PUT body.
Whether LDAP login is enabled.
falseLabel shown on the LDAP login button.
LDAPLDAP server URL.
ldap://ldap.example.comWhether to allow unauthorized (self-signed) certificates.
falseTLS/SSL security mode for the LDAP connection.
nonePossible values: LDAP server port.
389Base DN for LDAP search queries.
dc=example,dc=comDN of the LDAP admin user for binding.
cn=admin,dc=example,dc=comPassword for the LDAP admin user. Redacted on GET; returns the blanking placeholder when a password is stored, empty string when unset. Send the blanking placeholder from a prior GET to keep the stored password unchanged.
LDAP attribute mapped to the user's first name.
givenNameLDAP attribute mapped to the user's last name.
snLDAP attribute mapped to the user's email.
mailLDAP attribute used for login (usually the same as emailAttribute).
mailLDAP attribute that uniquely identifies a user.
uidAdditional LDAP filter to apply when searching for users. Use an empty string for no additional filter.
(objectClass=inetOrgPerson)Whether automatic LDAP synchronization is enabled.
falseInterval in minutes between automatic synchronizations. Ignored if synchronizationEnabled is false.
60Number of LDAP entries to fetch per search page.
1000LDAP search timeout in seconds.
60Whether to enforce that email addresses are unique across LDAP users. When true, if two users have the same email, only the first will be imported.
trueWhether an LDAP user may be linked to an existing n8n account that has the same email. When false, login and synchronization skip such users. Optional on PUT; the stored value is kept when omitted.
trueThe request is invalid or provides malformed data.
Unauthorized
Forbidden
Unsupported media type.
PUT /api/v1/settings/ldap HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 610
{
"loginEnabled": false,
"loginLabel": "LDAP",
"connectionUrl": "ldap://ldap.example.com",
"allowUnauthorizedCerts": false,
"connectionSecurity": "none",
"connectionPort": 389,
"baseDn": "dc=example,dc=com",
"bindingAdminDn": "cn=admin,dc=example,dc=com",
"bindingAdminPassword": "text",
"firstNameAttribute": "givenName",
"lastNameAttribute": "sn",
"emailAttribute": "mail",
"loginIdAttribute": "mail",
"ldapIdAttribute": "uid",
"userFilter": "(objectClass=inetOrgPerson)",
"synchronizationEnabled": false,
"synchronizationInterval": 60,
"searchPageSize": 1000,
"searchTimeout": 60,
"enforceEmailUniqueness": true,
"linkExistingAccountsByEmail": true
}{
"loginEnabled": false,
"loginLabel": "LDAP",
"connectionUrl": "ldap://ldap.example.com",
"allowUnauthorizedCerts": false,
"connectionSecurity": "none",
"connectionPort": 389,
"baseDn": "dc=example,dc=com",
"bindingAdminDn": "cn=admin,dc=example,dc=com",
"bindingAdminPassword": "text",
"firstNameAttribute": "givenName",
"lastNameAttribute": "sn",
"emailAttribute": "mail",
"loginIdAttribute": "mail",
"ldapIdAttribute": "uid",
"userFilter": "(objectClass=inetOrgPerson)",
"synchronizationEnabled": false,
"synchronizationInterval": 60,
"searchPageSize": 1000,
"searchTimeout": 60,
"enforceEmailUniqueness": true,
"linkExistingAccountsByEmail": true
}Retrieve the history of LDAP synchronizations, most recent first. Requires the ldap:sync scope and the LDAP feature to be licensed.
The maximum number of items to return.
100Example: 100Paginate by setting the cursor parameter to the nextCursor attribute returned by the previous request's response. Default value fetches the first "page" of the collection. See pagination for more detail.
Operation successful.
Paginate through the synchronization history by setting the cursor parameter to the nextCursor attribute returned by the previous request. A null value means there are no more records.
MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDAThe request is invalid or provides malformed data.
Unauthorized
Forbidden
GET /api/v1/settings/ldap/sync HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Accept: */*
{
"data": [
{
"id": 1,
"runMode": "live",
"status": "success",
"startedAt": "2025-07-21T10:30:00Z",
"endedAt": "2025-07-21T10:35:00Z",
"scanned": 42,
"created": 5,
"updated": 3,
"disabled": 0,
"error": ""
}
],
"nextCursor": "MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDA"
}Manually trigger an LDAP synchronization. The response returns the new sync history record. Requires the ldap:sync scope and the LDAP feature to be licensed.
Safe retry key for this POST. Use 1 to 128 visible ASCII characters. The same key and the same request return the first successful response. A different request with this key returns 422. A retry while the first request is in progress returns 409.
^[\x21-\x7E]+$Request body for triggering an LDAP synchronization.
Type of synchronization. 'live' applies changes to the database. 'dry' performs a test run and does not persist changes.
livePossible values: Operation successful.
LDAP synchronization history record.
Unique identifier for this sync run.
1Whether the sync was a dry run or applied live.
livePossible values: Status of the synchronization (for example, success or error).
successTimestamp when the synchronization started.
2025-07-21T10:30:00ZTimestamp when the synchronization completed.
2025-07-21T10:35:00ZNumber of LDAP entries scanned during synchronization.
42Number of new users created during synchronization.
5Number of existing users updated during synchronization.
3Number of users disabled during synchronization.
0Error message if the synchronization failed. Empty string if successful.
The request is invalid or provides malformed data.
Unauthorized
Forbidden
Conflict
Unsupported media type.
Unprocessable Entity
POST /api/v1/settings/ldap/sync HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 15
{
"type": "live"
}{
"id": 1,
"runMode": "live",
"status": "success",
"startedAt": "2025-07-21T10:30:00Z",
"endedAt": "2025-07-21T10:35:00Z",
"scanned": 42,
"created": 5,
"updated": 3,
"disabled": 0,
"error": ""
}Last updated
Was this helpful?