Skip to main content

Search LDAP User

This API searches for users in the connected LDAP directory server that match the provided keyword.

Endpoint Details

URL/v1/ldap/users
MethodPOST
AuthorizationBearer Token

Request Headers

HeaderTypeDescription
Content-TypeStringMust be application/json

Request Body

Use the following format to make a request:

JSON Request
{
"keyword": "member_aplikasi"
}

Parameters

ParameterTypeDescription
keywordStringKeyword used to search for matching LDAP users

Response

Here is an example response after the request has been successfully processed:

Response
{
"users": [
{
"dn": "CN=member aplikasi,OU=Taka,DC=prima,DC=net",
"sam_account_name": "member_aplikasi",
"mail": "memberaplikasi720@gmail.com",
"user_principal_name": "member_aplikasi@prima.net",
"display_name": "member aplikasi",
"given_name": "member",
"sn": "aplikasi",
"cn": "member aplikasi"
}
]
}

Field Descriptions

FieldTypeDescription
dnStringDistinguished name of the user in the LDAP directory
sam_account_nameStringSAM account name of the user
mailStringEmail address of the user
user_principal_nameStringUser principal name (UPN) of the user
display_nameStringDisplay name of the user
given_nameStringGiven (first) name of the user
snStringSurname (last name) of the user
cnStringCommon name of the user

info
  • A valid Bearer Token is required to access this endpoint.
  • The keyword is matched against LDAP user attributes such as the SAM account name, display name, and email.
  • Only users from the connected LDAP directory server are returned.