Keycloak · Arazzo Workflow
Keycloak Offboard a User
Version 1.0.0
Disable a user, strip realm role mappings and group membership, and optionally delete the account.
View Spec
View on GitHub
AuthenticationAuthorizationIdentity ManagementOpenID ConnectSecuritySSOArazzoWorkflows
Provider
Workflows
offboard-user
Disable a realm user, remove its roles and group membership, and optionally delete it.
Resolves the user by username, disables the account, strips realm-level role mappings and group membership, and deletes the account only when hardDelete is true.
1
resolveUser
Resolve the account UUID from the username. Every subsequent admin call is keyed on the UUID, and a miss here stops the flow before anything is changed.
2
disableUser
Disable the account first. This is the step that actually stops access, so it runs before the slower entitlement teardown rather than after it.
3
listRoleMappings
Read the realm-level role mappings currently granted to the user. The removal endpoint needs these representations verbatim in its body, so they have to be captured before they can be revoked.
4
stripRoleMappings
Revoke every realm-level role captured in the previous step by passing the role representations back to the delete-mappings endpoint.
5
listGroupMemberships
Read the groups the user belongs to, since group membership carries roles of its own and survives a disabled account.
6
removeFromPrimaryGroup
Remove the user from the first group returned. Keycloak exposes group removal one group at a time, so a user in several groups needs this workflow re-run per group id.
7
evaluateDeletion
Re-read the account to confirm it is disabled, and stop here unless the caller explicitly asked for a hard delete.
8
deleteUserAccount
Permanently delete the stripped account. Only reached when hardDelete is true; this cannot be undone.
Source API Descriptions
openapi
openapi
Arazzo Workflow Specification
Work with this as data
Every workflow here is available over the APIs.io API and to AI agents over MCP.