Log out user
keycloak_user_logoutRevoke all active sessions for a Keycloak user, forcing them to re-authenticate. Requires explicit confirmation to proceed.
Instructions
Destructive write that revokes all active sessions for a user, forcing them to re-authenticate, and returns "User logged out." on success or a "Not logged out: " message if confirmation was declined. Requires explicit confirmation: pass confirm=true, otherwise the operation is blocked pending approval. The account itself stays enabled; use keycloak_user_set_enabled to block future logins or keycloak_user_sessions_list to inspect sessions first. Effectively idempotent: once sessions are revoked, a repeat call has nothing left to revoke.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The Keycloak user id (UUID) whose sessions will be revoked. Required; obtain it from keycloak_user_search. | |
| confirm | No | Must be true to proceed; if omitted or false, the logout is blocked pending confirmation. Optional; defaults to false. |