Syncs your LDAP data based on the data sync configurations. This endpoint requires 2FA.
Make sure LDAP is enabled in Manage → Workspace → Settings → LDAP → Enable before using this endpoint.
Permission required: sync-auth-services-users.
From Rocket.Chat 9.0.0, LDAP is available on Starter workspaces and on all premium plans (Commercial, Government, and Defense). It is not available on Community workspaces, where this endpoint returns error-action-not-allowed. See Our Plans for details.
Changelog
| Version | Description |
|---|---|
| 9.0.0 | Added premium plan availability details. Returns 403 with errorType: error-forbidden instead of 400 when refused. |
| 5.2.0 | Include syncAvatars |
| 4.0.0 | Added |
The authenticated user token.
The authenticated user ID.
Enter the 2FA code. This parameter is required if 2FA is enabled in your workspace. See the Introduction to Two-Factor Authentication document for details.
Enter the method with which you get the 2FA code. It can be email, totp, or password. This parameter is required if 2FA is enabled in your workspace.
OK
{
"message": "Sync_in_progress",
"success": true
}Bad Request
{
"success": false,
"error": "TOTP Required [totp-required]",
"errorType": "totp-required",
"details": {
"method": "totp",
"codeGenerated": false,
"availableMethods": [
"totp"
]
}
}{
"success": false,
"error": "LDAP_disabled"
}{
"success": false,
"error": "This is an enterprise feature [error-action-not-allowed]",
"errorType": "error-action-not-allowed"
}Unauthorized
{
"success": false,
"error": "You must be logged in to do this."
}Forbidden
{
"success": false,
"error": "error-not-authorized",
"errorType": "error-forbidden"
}