Test if a given username can be found in the LDAP server using the authentication and filter settings provided to Rocket.Chat.
HTTP Method | URL | Requires Auth |
---|---|---|
POST | /api/v1/ldap.testSearch | yes |
{% hint style="info" %}
- Permission required:
test-admin-options
- Make sure that LDAP is enabled on your workspace. {% endhint %}
Key | Example Value | Description |
---|---|---|
username * | bob | The username that you want to search. |
curl 'http://localhost:3000/api/v1/ldap.testSearch' \
-H 'X-Auth-Token: yC3dGLAQVdge_utGjB57tgDEAgFhQewFTRa2Tx6GEsI' \
-H 'X-User-Id: hig6ucyFZ9bamdKgG' \
--data-raw '{
"username":"test.user"}'
User found:
{
"message": "LDAP_User_Found",
"success": true
}
User not found:
{
"success": false,
"error": "User not found"
}