Keycloak · Arazzo Workflow
Keycloak Onboard a User
Version 1.0.0
Provision a realm user, set an initial password, and grant a realm-level role.
View Spec
View on GitHub
AuthenticationAuthorizationIdentity ManagementOpenID ConnectSecuritySSOArazzoWorkflows
Provider
Workflows
onboard-user
Create a user in a realm, set an initial password, and assign a realm role.
Idempotently provisions a user account: reuses the account when the username already exists, otherwise creates it, then resolves the UUID, sets a temporary password, and grants the requested realm-level role.
1
confirmRealm
Read the realm representation to confirm the realm exists and is enabled before attempting to write any users into it.
2
precheckUser
Search the realm for an existing account with this username so the flow stays idempotent and never trips the 409 conflict on create.
3
createUserAccount
Create the enabled user account. Keycloak answers 201 with a Location header and no response body, so the UUID is resolved by the next step rather than read from this response.
4
resolveUserId
Resolve the user UUID by searching the realm for the username. Both the created and the pre-existing branch converge here, because every dependent Keycloak call is keyed on the UUID rather than the username.
5
setInitialPassword
Set the account password. Marking the credential temporary forces a password change at first login, which is the expected onboarding posture.
6
resolveRole
Look up the realm-level role by name to obtain the id and name pair that the role-mapping endpoint requires in its request body.
7
assignRealmRole
Grant the resolved realm-level role to the user. The body is an array of role representations, each requiring the id and name of the role.
8
verifyRoleMappings
Read the user's realm-level role mappings back to prove the grant landed before the onboarding flow reports success.
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.