Synchronize a user federation provider
keycloak_federation_syncSynchronizes users from a user federation provider (e.g., LDAP) into the Keycloak realm, importing or updating users. Use 'full' mode for a complete re-import or 'changed' for incremental sync.
Instructions
Triggers a user synchronization from a user federation provider (such as LDAP) into the current realm. This is a write operation that imports or updates users; it is not destructive but is not idempotent, since each call re-runs the sync and the imported counts can differ between runs. Use keycloak_federation_list or keycloak_federation_get first to confirm the provider id, then run this to refresh users. Returns a JSON object describing the sync result reported by Keycloak.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Component id of the federation provider to synchronize (a Keycloak component UUID, e.g. "f47ac10b-58cc-4372-a567-0e02b2c3d479"). Obtain it from keycloak_federation_list. Required. | |
| mode | No | Synchronization scope: "full" re-imports every user from the provider, while "changed" imports only users added or changed since the last sync. Optional; when omitted or set to any value other than "full", the handler defaults to "changed". |