Syncs your LDAP data based on the data sync configurations.
{% hint style="info" %}
- It requires the
sync-auth-services-users
permission. - It requires two-factor authentication. {% endhint %}
HTTP Method | URL | Requires Auth |
---|---|---|
POST | /api/v1/ldap.syncNow | yes |
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:
- 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. - LDAP Disabled: This occurs when the LDAP connection is disabled.
- TOTP Required: Requires two-factor authentication for the request to be made.
- Invalid TOTP: Requires a valid two-factor authentication code.
{% tabs %} {% tab title="Authorization" %}
{
"status": "error",
"message": "You must be logged in to do this."
}
{% endtab %}
{% tab title="No Permission" %}
{
"success": false,
"error": "error-not-authorized"
}
{% endtab %}
{% tab title="LDAP Disabled" %}
{
"success": false,
"error": "LDAP_disabled"
}
{% endtab %}
{% tab title="TOTP Required" %}
{
"success": false,
"error": "TOTP Required [totp-required]",
"errorType": "totp-required",
"details": {
"method": "totp",
"codeGenerated": false,
"availableMethods": [
"totp"
]
}
}
{% endtab %}
{% tab title="Invalid TOTP" %}
{
"success": false,
"error": "TOTP Invalid [totp-invalid]",
"errorType": "totp-invalid",
"details": {
"method": "totp",
"codeGenerated": false
}
}
{% endtab %} {% endtabs %}
Version | Description |
---|---|
4.0.0 | Added |
5.2.0 | Include syncAvatars on ldap.syncNow |