> ## 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. # Sync users ABAC attributes from LDAP >
Defense
- Syncs ABAC attributes for specified users from LDAP. - Refreshes user ABAC attributes by reading current data from LDAP and applying the configured LDAP → ABAC attribute mapping. - Users can be identified by usernames, ids, emails, or ldapIds. - Requires the LDAP Enterprise and ABAC licenses, the `abac-management` and `manage-abac-admin-room-attributes` permissions, and the global setting `ABAC_Enabled` to be turned on. ### Changelog | Version | Description | | ------- | ----------- | | 8.0.0 | Added | | 8.5.0 | Added the `manage-abac-admin-room-attributes` granular permission requirement. | ## OpenAPI ````json POST /api/v1/abac/users/sync { "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "Rooms" }, "servers": [ { "url": "https://apiexplorer.support.rocket.chat" } ], "tags": [ { "name": "Channels" }, { "name": "Directory" }, { "name": "Groups" }, { "name": "Rooms" }, { "name": "Teams" }, { "name": "Room Invites" }, { "name": "Subscriptions" }, { "name": "ABAC" } ], "paths": { "/api/v1/abac/users/sync": { "parameters": [], "post": { "summary": "Sync users ABAC attributes from LDAP", "tags": [ "ABAC" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } }, "examples": { "Success": { "value": { "success": true } } } } } }, "400": { "description": "Bad Request", "headers": {}, "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" } } }, "examples": { "ABAC disabled": { "value": { "success": false, "error": "error-abac-not-enabled" } }, "Invalid body (schema validation)": { "value": { "success": false, "error": "error-invalid-body-params" } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" } } }, "examples": { "Unauthorized login attempt": { "value": { "success": false, "error": "error-unauthorized" } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" } } }, "examples": { "Missing required ABAC permissions": { "value": { "success": false, "error": "error-not-authorized" } } } } } } }, "operationId": "post-abac-users-sync", "description": "
\"Defense\"
\n\n- Syncs ABAC attributes for specified users from LDAP.\n- Refreshes user ABAC attributes by reading current data from LDAP and applying the configured LDAP → ABAC attribute mapping.\n- Users can be identified by usernames, ids, emails, or ldapIds.\n- Requires the LDAP Enterprise and ABAC licenses, the `abac-management` and `manage-abac-admin-room-attributes` permissions, and the global setting `ABAC_Enabled` to be turned on.\n\n### Changelog\n| Version | Description |\n| ------- | ----------- |\n| 8.0.0 | Added |\n| 8.5.0 | Added the `manage-abac-admin-room-attributes` granular permission requirement. |", "parameters": [ { "$ref": "#/components/parameters/Auth-Token" }, { "$ref": "#/components/parameters/UserId" } ], "requestBody": { "description": "At least one of these properties is required:\n- usernames (string[]) — Array of Rocket.Chat usernames (1–100 items, unique)\n- ids (string[]) — Array of Rocket.Chat user IDs (1–100 items, unique)\n- emails (string[]) — Array of email addresses (1–100 items, unique)\n- ldapIds (string[]) — Array of LDAP IDs (1–100 items, unique)", "content": { "application/json": { "schema": { "type": "object", "properties": { "usernames": { "type": "array", "items": { "type": "string" } }, "ids": { "type": "array", "items": { "type": "string" } }, "emails": { "type": "array", "items": { "type": "string" } }, "ldapIds": { "type": "array", "items": { "type": "string" } } } }, "examples": { "Example 1": { "value": { "usernames": [ "alice" ], "ids": [ "userId1" ], "emails": [ "bob@example.com" ], "ldapIds": [ "ldapId123" ] } } } } } } } } }, "components": { "parameters": { "Auth-Token": { "name": "X-Auth-Token", "in": "header", "description": "The `authToken` of the authenticated user.", "required": true, "schema": { "type": "string" }, "example": "RScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f" }, "UserId": { "name": "X-User-Id", "in": "header", "description": "The `userId` of the authenticated user.", "required": true, "schema": { "type": "string" }, "example": "rbAXPnMktTFbNpwtJ" } } } } ````