Availability
This connector works with Keycloak servers that expose the Admin REST API (tested against Keycloak 26). Nested-group (sub-group) sync requires Keycloak 23 or later.Capabilities
The Keycloak connector syncs the following resources:
- Accounts: Keycloak realm users with username, email, name, login, and enabled status. Supports automatic account creation when a user requests access but does not yet exist in the realm, reversible enable/disable via connector actions, and permanent deletion.
- Groups: Keycloak groups with a static
memberentitlement. Grant and revoke add or remove users from a group. Enable Sync sub-groups to sync nested group hierarchies; parent groups inherit membership from child groups during sync.
Connector actions
Connector actions are custom capabilities that extend C1 automations with app-specific operations. You can use connector actions in the Perform connector action automation step.Gather Keycloak credentials
Configuring the connector requires credentials generated in the Keycloak Admin Console. Gather these credentials before you move on.Create a Keycloak client
1
In the Keycloak Admin Console, navigate to Clients.
2
Make sure you are in the correct realm, then click Create client.
3
Choose a Client ID for the client. Save this ID for connector setup.
4
Fill out the client registration form. Enable Client authentication (confidential client).
5
Save the client configuration.
6
On the client Credentials tab, copy and save the Client secret.
7
On the client Settings tab, enable Service accounts roles.
8
Open the client Service account roles tab.
9
Click Assign role, filter by Client roles, and select the realm-management client (in the master realm this client is named master-realm).
10
Assign these client roles to the service account:
manage-users— required to create users and grant or revoke group membershipview-users— required to sync users and read back created accountsquery-users— required to list and search users during syncquery-groups— required to list groups during sync
11
Note your Keycloak server URL and realm name for connector configuration.
A 403 Forbidden response when creating users means the service account is
missing the
manage-users role. This is a realm configuration issue, not a
connector defect.Configure the Keycloak connector
- Cloud-hosted
- Self-hosted
Follow these instructions to use a built-in, no-code connector hosted by C1.Done. Your Keycloak connector is now pulling access data into C1.
1
In C1, navigate to Integrations > Connectors and click Add connector.
2
Search for Keycloak and click Add.
3
Choose how to set up the new Keycloak connector:
- Add the connector to a currently unmanaged app (select from the list of apps that were discovered in your identity, SSO, or federation provider that are not yet managed with C1)
- Add the connector to a managed app (select from the list of existing managed apps)
- Create a new managed app
4
Set the owner for this connector. You can manage the connector yourself, or choose someone else from the list of C1 users. Setting multiple owners is allowed.If you choose someone else, C1 notifies the new connector owner by email that their help is needed to complete the setup process.
5
Click Next.
6
Find the Settings area of the page and click Edit.
7
Paste the Keycloak credentials into the relevant fields:
- keycloak-server-url (required): The URL of the Keycloak server
- keycloak-realm (required): The realm of the Keycloak server
- keycloak-client-id (required): The client ID you made
- keycloak-client-secret (required): The client secret for the client you made
- sync-sub-groups: Enable syncing of nested group hierarchies (subgroups)
8
Click Save.
9
The connector label changes to Syncing, followed by Connected. You can view the logs to ensure that information is syncing.