> ## Documentation Index > Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt > Use this file to discover all available pages before exploring further. # Test LDAP Connection > Test if Rocket.Chat can connect to the specified LDAP server using the port and host provided in the Rocket.Chat settings. Make sure LDAP is enabled in **Settings** > **LDAP** > **Enable** before using this endpoint. Permission required: `test-admin-options` ## OpenAPI ````json POST /api/v1/ldap.testConnection { "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "User Management" }, "servers": [ { "url": "https://apiexplorer.support.rocket.chat" } ], "tags": [ { "name": "LDAP" }, { "name": "Permissions" }, { "name": "Roles" }, { "name": "Users" }, { "name": "SAML" } ], "paths": { "/api/v1/ldap.testConnection": { "parameters": [], "post": { "tags": [ "LDAP" ], "summary": "Test LDAP Connection", "description": "Test if Rocket.Chat can connect to the specified LDAP server using the port and host provided in the Rocket.Chat settings.\nMake sure LDAP is enabled in **Settings** > **LDAP** > **Enable** before using this endpoint.\n\nPermission required: `test-admin-options`", "operationId": "post-api-v1-ldap.testConnection", "parameters": [ { "$ref": "#/components/parameters/Auth-Token" }, { "$ref": "#/components/parameters/UserId" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" }, "success": { "type": "boolean" } } }, "examples": { "Success Example": { "value": { "message": "Connection_success", "success": "true" } } } } } }, "401": { "$ref": "#/components/responses/authorizationError" } } } } }, "components": { "parameters": { "Auth-Token": { "name": "X-Auth-Token", "in": "header", "description": "The authenticated user token.", "required": "true", "schema": { "type": "string" }, "example": "RScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f" }, "UserId": { "name": "X-User-Id", "in": "header", "description": "The authenticated user ID.", "required": "true", "schema": { "type": "string" }, "example": "rbAXPnMktTFbNpwtJ" } }, "responses": { "authorizationError": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "message": { "type": "string" } } }, "examples": { "Authorization Error": { "value": { "status": "error", "message": "You must be logged in to do this." } } } } } } } } } ````