Keycloak SCIM provisioning: when a sync from HR or governance tools is worth building
Provisioning into Keycloak is worth building when an HR or identity governance system already holds joiner, mover and leaver data and someone is currently copying that data into Keycloak by hand. A sync moves accounts, attributes and group memberships from the system of record into the realm so that access follows employment events without an administrator in the loop. The case is strongest when headcount changes often, when several applications depend on the same realm, or when leavers must lose access on a defined schedule that an auditor can trace. If the user base is small and changes rarely, manual administration or a lighter workflow may be enough.
SCIM (System for Cross-domain Identity Management) is the standard HTTP and JSON interface that most HR and governance products use to create, update and deactivate users and groups in a target system. Before committing to a design, confirm in the Keycloak release you run, currently 26.8.1 according to the project's supplied release information, whether a SCIM endpoint is provided natively, through a supported extension, or not at all. Do not assume the feature exists because the protocol is common. Equally, confirm what the upstream product can push and how it authenticates, because that determines which side of the exchange you build.
The work covers the sync path, the attribute and group mapping between the source schema and the Keycloak user profile, the service account and its permissions, and verification that a test joiner, mover and leaver each produce the expected result. It does not cover configuring the HR system, cleaning its data or changing its approval processes, which remain with the owners of those systems. Ask any partner to show, in writing, which records the sync creates, updates and disables, how deletions are handled, and how failed runs are detected and retried before you agree a scope.
Which provisioning path fits your identity architecture
This table compares the realistic routes for moving HR and governance data into Keycloak. Read each row by asking who owns the authoritative record, who writes and tests the integration code, and what changes at each Keycloak upgrade. The main takeaway is that SCIM endpoint availability and any Keycloak connector are version-specific facts to verify before the design is fixed.
| Provisioning path | Best fit | Who maintains it and upgrade exposure | What to confirm first |
|---|---|---|---|
| Native or extension SCIM endpoint | HR or governance tool pushes users and groups directly, with no middle layer | The endpoint's publisher maintains it; every Keycloak upgrade needs regression testing against it | Whether an endpoint ships for your target version, which SCIM resources it covers, and its support status |
| Administration REST API through middleware | Custom attribute mapping, approval logic outside Keycloak, or a small set of attributes | Your team or a DeployOpen-built integration owns the code; API changes must be tracked in each upgrade | Service account roles for user and group writes, token handling, and the stability of the API version you target |
| LDAP or Active Directory user federation | The directory already holds the authoritative identity and Keycloak should read it | Directory team owns source data; Keycloak team owns mappers, sync schedules and removal behavior | Which attributes map, whether groups sync as needed, and how disabled or deleted accounts propagate |
| midPoint with a SCIM2 or other ConnId connector | Joiner, mover and leaver logic, approvals and access certification belong in an identity governance platform | Evolveum maintains midPoint core; connector support status determines who fixes Keycloak-facing code | Whether a Keycloak connector exists, its support level in the connector catalog, and whether the SCIM2 connector targets your Keycloak version |
| Other governance platform with its own Keycloak connector | An existing governance tool already in use provides provisioning workflows | The connector vendor maintains the connector; your team owns configuration and upgrade testing | Supported Keycloak versions, the API surface used, and whether group membership and role writes are included |
| Manual administration or bulk import | Small pilots, one-time loads, or temporary populations before automation is ready | Your administrators own the process; errors and drift are not caught automatically | Import tooling for your version, audit trail for changes, and a path to automated provisioning later |
How a joiner, mover or leaver change reaches Keycloak
The diagram starts at the authoritative HR system, which holds the employment record. A governance tool, if you run one, sits between HR and the sync connector and decides which changes apply. The connector then calls Keycloak's SCIM endpoint using a dedicated service account credential, and that call crosses the trust boundary into the admin hostname. User records and group membership travel as separate paths. Confirm SCIM endpoint availability and scope for your target Keycloak version before you build.
Joiner, mover and leaver changes flow from HR through a connector into Keycloak's user and group stores.
How SCIM attributes map to the Keycloak user profile
The attribute mapping decides whether a provisioning run creates the right accounts, so settle it before any endpoint or connector is configured. In SCIM core, userName is the login identifier and maps to the Keycloak username. name.givenName and name.familyName map to firstName and lastName, and emails maps to email. The SCIM active flag is the natural source for the Keycloak enabled setting, so a deprovisioning run should disable the account, and deletion should be a separate, deliberate decision. Keycloak has no standard field for externalId, so it usually becomes a custom user attribute. Group membership maps to Keycloak groups, not to a user attribute. Required actions are not part of SCIM core, so decide whether they come from the source system or from realm policy.
Keycloak's user profile configuration decides which attributes are required, editable and visible, and a mismatch with the SCIM payload causes two different failures. If the payload omits an attribute the profile requires, the create fails and the error appears in the provisioning log. If an attribute exists but is not editable or not visible in the context the provisioning identity uses, the value can be dropped without an error, which is harder to detect. Check each mapped attribute against the user profile of the Keycloak version you run, including its validators and the contexts in which it is available. The Keycloak server administration guide documents these settings, and you should confirm attribute names and validation rules there before copying any example into your configuration.
Fix one join key before the first sync. A common choice is the HR employee ID, stored in a custom Keycloak attribute and sent by the source as externalId. Usernames often change after renames or moves between entities, so they make a weak join key unless your HR process guarantees they stay fixed. Write a mapping register that names the owning system for each attribute, for example HR owns name and employment status while another source owns contact details, and assign exactly one owner per field so two sources do not overwrite each other. Also confirm which SCIM endpoint and extension your Keycloak build exposes and how it matches an incoming record to an existing user, because the result of a re-sync depends on that behavior.
What the service account can and cannot change
The provisioning credential is the most powerful non-human identity in a SCIM integration, because it can create, change and disable every account it reaches. The cards below set out the decisions that limit its reach, and each one should be confirmed against the Keycloak version in use before roles are granted.
Dedicated confidential client
Create a separate confidential client for the provisioning integration with its own service account, instead of reusing an administrator login or a shared client. Each source system then gets its own identity, its own secret and its own revocation path. Disabling this one client should stop the sync without touching anything else. Check that the client does not allow standard browser login flows it does not need.
Keycloak docsRealm-scoped client roles only
Grant the service account client roles for user and group management in the target realm, not the realm administrator role. Full realm administration can change clients, authentication flows, keys and the admin console itself, none of which a provisioning job needs. Role names and what each one allows must be confirmed against the Keycloak version you run before granting them, because role sets change between releases.
- Current release
- 26.8.1
Separate realm for sync credentials
Where the design allows it, keep the provisioning client in a management realm that is separate from the realm holding production users. A compromise of the sync credential then reaches fewer identities, and realm-level policies such as brute force settings or admin event logging can be set independently. Weigh this against the extra realm administration and the need for cross-realm mapping in your design.
Secret storage and rotation
Store the client secret in the organization's secrets manager and inject it into the connector at runtime, never in a configuration file, source repository or ticket. Define who may read the secret, how often it rotates, and the steps for rotating it without a gap in sync. Confirm how your chosen source system or connector reloads a rotated secret, since some require a restart.
Deny deletes, allow disables
Design the account's permissions so it can disable a user but cannot permanently delete one. An HR feed error or a malformed record could otherwise remove accounts with their history. Disabling keeps audit trails and lets a person re-enable access if a leaver event was wrong. Confirm in your SCIM integration that a deprovisioning request maps to a disable action, and document who approves any permanent removal.
Log every change the account makes
Enable admin event logging and store representations for changes made by the provisioning client, then forward those events to your log platform. The record should show which client made each user or group change, from which address, and what changed. Confirm retention periods against your audit requirements, because Keycloak's defaults may not match them.
Setup sequence for a Keycloak provisioning integration
This sequence takes a Keycloak provisioning integration from version confirmation to a production cut-over with a rollback plan. Each step ends with a check you can record, so the team knows the source of truth, attribute mapping, service account and sync logic behave correctly before any production user changes. Work is shared between your identity team, the owner of the HR or governance system, and the implementer.
Confirm the target Keycloak version and API path
Confirm the exact Keycloak version in your environment and the provisioning path it exposes. Check the release notes for that version and the Keycloak server administration guide for the user and group endpoints of the Administration REST API. Do not assume a SCIM endpoint exists until your version's documentation or a test call confirms it. Record the version, each endpoint, and the authentication method it accepts. Done when a read-only call returns the expected user list from a test realm.
Agree the authoritative source and join key
Name the system of record for identity data, usually the HR system or the identity governance tool, and state which system wins when attributes conflict. Choose a stable join key, such as an employee ID, and check that it is unique in a sample extract, since email addresses often change. Write down who owns each attribute, how leavers are signaled, and how a Keycloak user with no matching source record is handled. Done when every attribute owner has signed the document and the join key passes the uniqueness check.
Map attributes to the user profile
Map each source attribute to a Keycloak user profile attribute, including custom attributes, required fields and validation rules. Decide which fields the Admin Console should treat as read-only so administrators cannot edit provisioned values and create drift between the two systems. Decide how source group memberships map to Keycloak groups, and whether any roles are derived from them. Done when a test record produces the exact expected profile in a scratch realm and each attribute owner has reviewed the result.
Create a dedicated client and least-privilege service account
Create a confidential client for the provisioning job with its own service account. Do not reuse an administrator account or a master realm administrator. Grant only the realm-management roles needed for the operations in scope, such as managing users and groups in the target realm, and confirm the role names against your version. Exclude roles that change realm settings, clients or keys. Store the client secret in your secrets manager and name an owner for rotation. Done when a token request succeeds and a test call to an out-of-scope endpoint is refused.
Build the sync in a non-production realm
Build the provisioning job in a non-production realm that mirrors the production user profile, groups, required actions and authentication flows. Make the job idempotent so repeated runs converge on the same state, and log every create, update and disable with the source record ID. Use a test extract rather than live HR data until the project team approves the move. Done when two consecutive runs against the same extract make no changes on the second run.
Test create, update, disable and group failure cases
Run a scripted test set against the test realm: create a joiner, update a changed title or department, disable a leaver, and move a user between groups. Add failure cases, including a duplicate join key, a missing required attribute, an API timeout during a run, a group that does not exist, and a source record removed without notice. Confirm that a disabled leaver cannot sign in to a test application, and that each failure is logged and then retried or escalated. Done when every case has a recorded expected result and actual result.
Reconcile source and Keycloak counts
After a full run, compare counts and identities between the source extract and Keycloak. Confirm that active users in Keycloak match active source records, that disabled leavers are accounted for, and that group membership totals match for each group. Investigate every difference and classify it as a mapping defect, a source data issue, or an account excluded by a documented policy. Done when the reconciliation report has no unexplained differences and the owner of each exclusion has signed off.
Cut over with a tested rollback plan
Schedule the production cut-over with the source owner and the Keycloak administrators present, and freeze manual changes to provisioned attributes for the window. Before enabling the job, export the realm configuration and record the current user and group state so the first run can be reversed. Define the rollback trigger and name who decides to invoke it, then rehearse the rollback in the test realm. Done when the first production run matches the reconciliation baseline and the rollback rehearsal has succeeded.
Operating the sync safely after go-live
Once provisioning runs, the first controls to confirm are transport and exposure. The Keycloak production guide calls for TLS on all communication and recommends exposing the admin console and Administration REST API on a different hostname or context path from public frontend URLs, behind a reverse proxy with path restrictions. The SCIM endpoints and the service account's token requests should sit on that protected path, not on the public login hostname. Confirm in your own environment which hostname your HR or governance tool calls, whether your reverse proxy blocks the admin paths from the internet, and who owns the certificates and their renewal. These settings depend on your network design, so verify them with your platform and security teams rather than assuming the defaults.
Attribution comes next. Enable user and admin event logging so every SCIM create, update and deactivation can be traced to the service account that made it, and make sure the stored representations and retention period meet your audit needs. Keep the service account's client secret or certificate under the same rotation process as other privileged credentials. For monitoring, start Keycloak with --metrics-enabled=true so Prometheus-format metrics are exposed at /metrics on the management interface, then alert on failed provisioning requests and unexpected spikes in user creation or deletion. Confirm that the management interface itself is not reachable from public networks, since it is a separate exposure from the admin API.
Drift is what the sync cannot see on its own, because a failed push or a manual change in the Admin Console leaves the two systems disagreeing without an error. Schedule a reconciliation job that compares the source of record with Keycloak's users and group memberships and reports differences for review. Upgrades add a second risk: a minor release can change API behavior, so test SCIM calls against a staging realm before each upgrade. The Keycloak Operator documentation strongly recommends manual approval mode for operator updates, which prevents an upgrade from landing unreviewed. Check the Keycloak upgrading guide against each target version, and confirm with your team how often you will run reconciliation and who signs off on upgrade test results.
Limits to confirm before committing to a design
Keycloak SCIM provisioning depends on behaviors that short demos and feature lists often leave out. The cards below name the questions to settle with the vendor or test in a pilot before you choose a design. Each one covers a behavior that changes access, audit trails or upgrade effort if it differs from what you expect.
Native SCIM support in the target release
Before you choose between a built-in endpoint and an external bridge, confirm whether the Keycloak release you plan to run exposes SCIM at all, and which resources, operations and filters it covers. Ask the project or Red Hat for the exact release and its documentation, then test user create, update and deactivate calls against a pilot realm. Do not assume that a feature named in a roadmap, a blog post or a third-party plugin exists in your version. Confirm the release and the operation list first.
Group membership and nested groups
Groups carry most access decisions, so check how SCIM group resources represent their members and whether nested groups arrive as parent and child relationships or as flat lists. Find out whether a membership change in the HR or governance system updates the user's group set in Keycloak in one step, and whether a removal is sent as an explicit membership change. Test one nested group whose child inherits a role mapping. Flat sync can hide inherited access.
Deletes and deactivations
Leavers must lose access quickly, so map each source event to a Keycloak outcome. Confirm whether a SCIM DELETE removes the user or disables the account, whether a PATCH that sets the active flag to false blocks new sign-ins, and whether existing sessions and refresh tokens end. Decide how a removed account keeps its audit history and whether a rehire with the same identifier reuses the old record. Disable and delete must be tested as separate cases.
Performance at expected volume
Ask for the user count, group count, daily change rate and peak bulk load you plan for, then test the provisioning path at that scale, including a full initial load. Measure how long the initial load takes, the lag between an HR change and the matching Keycloak change, and the database and cache load during the run. Confirm whether the vendor documents throughput limits, batch behavior or rate limits on the endpoint. Measure lag at production volume.
Lifecycle of the bridge or connector
If the governance tool reaches Keycloak through a connector, bridge or custom extension, that component becomes part of your upgrade surface. Find out who builds and maintains it, which Keycloak and governance platform versions it supports, and what its release cadence and support terms are. The midPoint connector catalog documents a SCIM2 connector through the ConnId framework, but confirm that it targets your Keycloak endpoint and version. Name an owner for the bridge before go-live.
Connector docsBehavior after upgrades
Keycloak plans four minor releases a year and states that breaking changes in a minor release are opt-in, but major releases and governance platform upgrades can still change provisioning behavior. Re-run your provisioning test suite after each upgrade of either side, and check that attribute names, PATCH handling and group semantics still match. Midpoint's 4.11 release is planned for 21 October 2026 and recommends Java 25 for version 4.11 and later. Re-test both sides after every upgrade.
Compatibility policyQuestions buyers ask about Keycloak SCIM provisioning
What drives the cost of Keycloak SCIM provisioning work?
Cost follows the amount of identity work, not the number of user accounts. The main drivers are how many source systems feed Keycloak (HR, an identity governance tool, directories), how many attributes must map to the Keycloak user profile and how much transformation those attributes need, how groups and roles are modeled, whether deprovisioning runs in the same flow, and how much testing the non-production environments require. Each source and mapping rule adds design, build and test effort. Costs split into one-time work (design, build, testing, cutover) and recurring work (connector changes, upgrades, support). Ask for a quote that itemizes these tasks, names who performs each one, and lists what is excluded.
How long does a Keycloak SCIM provisioning project take?
No single duration applies to every project, so confirm the timeline against the written scope. The duration depends mainly on the number of source systems, the complexity of the attribute mapping and group model, how quickly the client makes HR and ownership decisions, access to test environments and service accounts, and the number of review cycles. Organizations with clean HR data and a settled group model usually move faster than those still deciding which system owns each attribute. Ask the partner to show the phases, the decisions each phase depends on, and what the client must deliver before each phase starts.
What inputs does the client need to provide before provisioning starts?
Expect to provide an HR data extract or sample feed in the format it is actually sent, named owners for each attribute and group, written source-of-truth decisions that state which system wins when two disagree, a non-production Keycloak realm for testing, a service account with agreed permissions, and test accounts that cover joiners, movers and leavers. You should also name a decision-maker who can approve mapping changes quickly. Decisions made late usually cause rework, so agree these inputs before the build starts and record them in the scope document.
Can our internal team build Keycloak SCIM provisioning themselves?
Yes, if the team has working knowledge of Keycloak administration and configuration, identity data modeling, SCIM concepts, and the HR or directory systems involved. The harder work is in the decisions: attribute ownership, group semantics, handling of changed or duplicate identities, and deprovisioning rules. Check whether the team can run a test plan that covers failure cases, and confirm who owns the service account credentials. Internal teams usually should own the decisions and daily operation, even if a partner builds the first version. Confirm the exact SCIM capabilities of your Keycloak release in its documentation before you estimate internal effort.
What recurring work follows a Keycloak SCIM provisioning launch?
Recurring work falls into three areas. Keycloak releases: the project plans four minor releases a year and says breaking changes in a minor release are opt-in, but each upgrade still needs regression testing of provisioning flows. Source changes: HR fields, directory schemas and vendor API versions change and can break mappings. Operations: monitoring sync failures, reviewing service account permissions, rotating credentials and handling exceptions that need a person. If a governance tool or connector sits in the flow, it needs its own upgrades and connector checks. Ask for the support, upgrade and testing terms in writing, and confirm whether they are offered as a retainer.
How should we compare provisioning quotes from different implementation partners?
Start by comparing scope items, then compare totals. Check whether each quote lists the same sources, attributes, group rules, deprovisioning cases, test cycles, documentation, handover and post-launch support. Ask who performs each task and whether the named engineers are part of the team you will work with. Review the exclusions, the assumptions about client inputs, how change requests are priced, and what happens if the HR data is poor. DeployOpen works from a fixed-scope written agreement, so deliverables and timelines are agreed in writing before work starts. Send every bidder the same written requirements so the quotes can be compared line by line.
Do we need an identity governance tool alongside Keycloak SCIM provisioning?
Not always. Keycloak can receive provisioning from a trusted source through SCIM, and that may be enough for a single source and a small set of groups. A governance tool becomes useful when you need approval workflows, access certification, role models or many target systems. Evolveum describes midPoint as an identity management system, not an access management or SSO server, so it would sit alongside Keycloak: midPoint would manage lifecycle and governance, while Keycloak continues to handle sign-in. Its connector catalog includes a SCIM2 connector, but confirm the fit for your targets before choosing it. Evolveum's FAQ explains the division of roles.
How DeployOpen scopes and delivers Keycloak provisioning
DeployOpen plans, builds, tests and documents Keycloak SCIM user and group provisioning inside infrastructure you control. Each engagement starts from a written scope that names the source systems, the attributes to map and the test cases the provisioning must pass before it goes live.
How we scope
- Confirm which HR system or identity governance tool will send SCIM requests, and which Keycloak realm receives them.
- Agree the user and group attributes to map to the Keycloak user profile, and which ones stay out of scope.
- Define the service account roles, the deprovisioning rules and the exact deliverables in writing before work starts.
How we build
- Create a dedicated service account with only the roles the SCIM endpoints need, and document each permission granted.
- Build the attribute mapping and group handling in a test realm, then run create, update, disable and delete cases against it.
- Test failure paths, including duplicate users, missing attributes and repeated requests, before the integration reaches production.
How we hand over
- Deliver the mapping tables, service account settings and configuration in a form your platform team can review and version.
- Document the provisioning flow, the operational runbook and the steps to rotate the service account credentials.
- Walk your administrators and engineers through the tests and the procedure for diagnosing a failed sync.
How we support
- Ongoing support, upgrades and continuous testing are available as a retainer, covering changes to Keycloak or the source system.
- Retest provisioning after each Keycloak upgrade, since SCIM behavior and the Admin REST API can change between releases.
- Ask for the retainer terms, response expectations and retest scope in the quote, alongside the fixed-scope proposal.

