Comment on page
LDAP SyncNow
Sync LDAP users
URL | Requires Auth | HTTP Method |
---|---|---|
/api/v1/ldap.syncNow | yes | POST |
Argument | Example | Required | Description |
---|---|---|---|
X-User-Id | myuser-name | Required | The authenticated user ID. |
X-Auth-Token | myauth-token | Required | Auth token. |
x-2fa-code | 148750 | Required | The 2fa code. |
curl --location --request POST 'http://localhost:3000/api/v1/ldap.syncNow' \
--header 'x-auth-token: 0ueGH0dyW5ewtemsyiBlrC8pU4yBbRUtReXiglvisoZ' \
--header 'x-user-id: 2tTEqR7ZNMJ4HGGNa' \
--header 'x-2fa-code: 773917'
{
"message": "Sync_in_progress",
"success": true
}
Any of the following errors can occur on the endpoint.
- Authorization: Requires an authentication token for the request to be made.
- No Permission: This occurs when the authenticated user doesn't have the
sync-auth-services-users
permission. - TOTP Required: Requires two-factor authentication for the request to be made.
- Invalid TOTP: Requires a valid two-factor authentication code.
Authorization
No Permission
LDAP Disabled
TOTP Required
Invalid TOTP
{
"status": "error",
"message": "You must be logged in to do this."
}
{
"success": false,
"error": "error-not-authorized"
}
{
"success": false,
"error": "LDAP_disabled"
}
{
"success": false,
"error": "TOTP Required [totp-required]",
"errorType": "totp-required",
"details": {
"method": "totp",
"codeGenerated": false,
"availableMethods": [
"totp"
]
}
}
{
"success": false,
"error": "TOTP Invalid [totp-invalid]",
"errorType": "totp-invalid",
"details": {
"method": "totp",
"codeGenerated": false
}
}
Version | Description |
---|---|
4.0.0 | Added |
5.2.0 | Include syncAvatars on ldap.syncNow |
Last modified 2mo ago