Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Latest commit

 

History

History
44 lines (32 loc) · 1.27 KB

File metadata and controls

44 lines (32 loc) · 1.27 KB

Test LDAP User Search

Test if a given username can be found in the LDAP server using the authentication and filter settings provided to Rocket.Chat.

HTTP MethodURLRequires Auth
POST/api/v1/ldap.testSearchyes

{% hint style="info" %}

  • Permission required: test-admin-options
  • Make sure that LDAP is enabled on your workspace. {% endhint %}

Body Parameters

KeyExample ValueDescription
username*bobThe username that you want to search.

Example Call

curl 'http://localhost:3000/api/v1/ldap.testSearch' \
  -H 'X-Auth-Token: yC3dGLAQVdge_utGjB57tgDEAgFhQewFTRa2Tx6GEsI' \
  -H 'X-User-Id: hig6ucyFZ9bamdKgG' \
  --data-raw '{
    "username":"test.user"}'

Example Response

User found:

{
  "message": "LDAP_User_Found",
  "success": true
}

User not found:

{
  "success": false,
  "error": "User not found"
}