Enable or disable user
keycloak_user_set_enabledSet a Keycloak user account's enabled state to true or false. Disabling prevents login without deleting the account or ending active sessions.
Instructions
Write operation that enables or disables a single user account by id, returning a confirmation message. Disabling blocks the user from logging in but does not delete the account or revoke existing sessions; use keycloak_user_logout to terminate active sessions, or keycloak_user_delete to remove the account. Idempotent: setting the same enabled value repeatedly leaves the account in the same state.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The Keycloak user id (UUID) of the account to enable or disable. Required; obtain it from keycloak_user_search. | |
| enabled | Yes | Target state: true to enable the account, false to disable it. Required. |