---
title: "Test LDAP connectivity"
method: POST
path: "/ldap/check"
tags: ["ldap"]
---

# Test LDAP connectivity

`POST /ldap/check`

Test LDAP connectivity using LDAP details
**Access policy**: administrator

## Request body

- LdapCheckPayload
  - `LDAPSettings` PortainerLDAPSettings
    - `AnonymousMode` boolean — Enable this option if the server is configured for Anonymous access. When enabled, ReaderDN and Password will not be used
    - `AutoCreateUsers` boolean — Automatically provision users and assign them to matching LDAP group names
    - `GroupSearchSettings` PortainerLDAPGroupSearchSettings[]
      - `GroupAttribute` string — LDAP attribute which denotes the group membership
      - `GroupBaseDN` string — The distinguished name of the element from which the LDAP server will search for groups
      - `GroupFilter` string — The LDAP search filter used to select group elements, optional
    - `Password` string — Password of the account that will be used to search users
    - `ReaderDN` string — Account that will be used to search for users
    - `SearchSettings` PortainerLDAPSearchSettings[]
      - `BaseDN` string — The distinguished name of the element from which the LDAP server will search for users
      - `Filter` string — Optional LDAP search filter used to select user elements
      - `UserNameAttribute` string — LDAP attribute which denotes the username
    - `StartTLS` boolean — Whether LDAP connection should use StartTLS
    - `TLSConfig` PortainerTLSConfiguration
      - `TLS` boolean, required — Use TLS
      - `TLSCACert` string — Path to the TLS CA certificate file
      - `TLSCert` string — Path to the TLS client certificate file
      - `TLSKey` string — Path to the TLS client key file
      - `TLSSkipVerify` boolean, required — Skip the verification of the server TLS certificate
    - `URL` string — URL or IP address of the LDAP server

## Response `204`

Success

## Other responses

- `400` — Invalid request
- `500` — Server error

---

[API](https://skmtc.net/portainer/apis/portainerce-api.md) · [All operations](https://skmtc.net/portainer/apis/portainerce-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/portainer/portainerce-api/versions/c0b0975cd11b/schema)
