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 ManagementOAuthOpenID 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
getUsers
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
updateUser
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
getUserRealmRoleMappings
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
deleteUserRealmRoleMappings
Revoke every realm-level role captured in the previous step by passing the role representations back to the delete-mappings endpoint.
5
listGroupMemberships
getUserGroups
Read the groups the user belongs to, since group membership carries roles of its own and survives a disabled account.
6
removeFromPrimaryGroup
removeUserFromGroup
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
getUser
Re-read the account to confirm it is disabled, and stop here unless the caller explicitly asked for a hard delete.
8
deleteUserAccount
deleteUser
Permanently delete the stripped account. Only reached when hardDelete is true; this cannot be undone.