--- title: "POST | Deactivate LDAP server" slug: "api-v2-post-deactivate-ldap-server" updated: 2026-11-03T14:57:57Z published: 2026-11-03T14:57:57Z canonical: "docs.senhasegura.io/api-v2-post-deactivate-ldap-server" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.senhasegura.io/llms.txt > Use this file to discover all available pages before exploring further. # POST | Deactivate LDAP server ## Description Deactivate an LDAP/AD server connection profile in the Segura™ platform. An inactive server leaves the authentication chain and no longer takes part in user authentication. --- ## Prerequisites - An application with the **Users** authorization granted by the administrator in A2A, and its resource permission set to **Read and write**. For more information, access [How to manage authorizations in A2A](/v4-2/docs/how-to-manage-authorizations-in-a2a). - A valid OAuth 2.0 access token. For more information, access [How to authenticate an application in A2A](/v4-2/docs/how-to-authenticate-an-application-in-a2a). --- ## Request `POST` `/api/v2/iam/ldap-servers/{id}/deactivate` ### Path parameters | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer | Yes | Unique identification code of the LDAP server. **Note:** this value is assigned by Segura™ in [POST \| Create LDAP server](/v4-2/docs/api-v2-post-create-ldap-server). | The request takes no body. --- ### Example request `POST` `{{url}}/api/v2/iam/ldap-servers/7/deactivate` --- ## Response ``` HTTP/1.1 204 No Content ``` The response has no body. Attention Deactivation does not cascade. The group synchronizations bound to the server keep their own state, and the users and roles already provisioned from the directory are left in place. An inactive server also refuses configuration changes: [PUT | Update LDAP server by [id]](/v4-2/docs/api-v2-put-update-ldap-server) and [PATCH | Partially update LDAP server by [id]](/v4-2/docs/api-v2-patch-update-ldap-server) return `409 api.resource.inactive` until the server is activated again. --- ## Errors | HTTP code | Message | Possible cause | Solution | | --- | --- | --- | --- | | `401` | `api.auth.unauthorized` | The access token is missing or has expired. | Request a new access token. | | `404` | `api.resource.not_found` | The server does not exist. | Check the identification code sent in the path. | | `409` | `api.resource.conflict.already_inactive` | The server is already inactive. | No action is needed. | | `429` | `api.rate_limit.exceeded` | The request rate limit was exceeded. | Reduce the request rate and try again. | ### Example error response `409` the server is already inactive: ``` { "code": "api.resource.conflict.already_inactive", "message": "LDAP server is already inactive.", "details": null } ``` For authentication error messages and the `403` versus `404` policy, access [API v2 - Conventions and shared behaviors](/v4-2/docs/api-v2-conventions-and-shared-behaviors).