Configure KeyCloak SCIM integration for Nintex Automation K2
Use this guide to configure and install the
Supported features
The following items are the current features supported by the KeyCloak SCIM integration for Nintex Automation K2:
- SP-initiated SSO
- Create Users
- Update User Attributes
- Deactivate/Reactivate Users
- Group Push
Prerequisites
- Nintex Automation K2 (5.9) introduced a preview feature, however, Nintex Automation K2 (5.9.1) does not support this configuration. You must revert your environment before configuring OIDC in Nintex Automation K2 (5.9.1). See Troubleshooting for resolution.
-
Create a new realm (optional) in KeyCloak. If you don’t want to use the default master realm, you can create a new realm for your app:
- In the admin console of KeyCloak, click on the Master drop down in the top left and select Add Realm.
- Give it a name and click Create.

- On the current realm go to the Clients section and click the Create client button

- Create a new KeyCloak client

- Configure the redirect URLs

- Ensure public access is not enabled and set the Authentication flow to Implicit flow

- In the General settings for your client, you can not set your Client ID

- In the Credentials section, you will find your Client Secret. This value must be saved for later.

You can now use these details to setup KeyCloak in Nintex Automation K2 with the OIDC preview tool.
- Clientid – ID for you client app
- Authority – Domain for you IDP
- Client Secret - GUID generated by your client
Follow the steps below to configure OIDC for your environment
Navigate to Management, expand Authentication, and select OpenID Connect.

Add the Issuer Base URL (Authority), Client ID and Client Secret.

Click Register Identity Provider.

This will register your identity provider, insert the security label, create the OAuth resource and Claim Issuer, and map the appropriate claims.

Click Finish to open the Identity Provider Configuration page.

Double-check that all details are correct before selecting Enable IdP. By default, the identity claim is set to email.

If any details need to be changed, click Edit Identity Provider and update them as needed.

Once you’re satisfied with the identity provider details, set Enable IdP to true. A confirmation message will appear indicating that the identity configuration was updated successfully.

Clear your browser cache, then restart your browser to ensure the changes take effect.
Navigate to Designer, Management, or Workspace. The OIDC sign-in page will be displayed.


Prerequisites
Download the latest version of the SCIM provider here: keycloak-scim
Copy it to: keycloak\providers\
Restart KeyCloak
- Remember to always make sure you are on the correct realm
- The SCIM API must be enabled in Management, as the OIDC configurer does not enable that automatically.
In the K2 database run:
K2 database codes to be run
DECLARE @TypeID int = (SELECT Top 1 ID FROM [SyncEngine].[ProviderType] WHERE [Type] = 'SCIM')
DECLARE @ProviderID int = (SELECT Top 1 ID FROM [SyncEngine].[Provider] WHERE [ProviderTypeID] = @TypeID)
SELECT * FROM [SyncEngine].[ProviderInstance] WHERE [ProviderID] = @ProviderID
-
In KeyCloak go to Console > Events > Event Configs (or in Real settings > Events), and add scim in Event listeners.

-
Go to User Federation and click on Add Scim providers.

-
Add the following information for the SCIM provider.

- UI display name: K2Scim
- SCIM 2.0 endpoint: https://nintex.k2test.net/api/scim/v2/{ProvInstID}/
- AuthMode: BASIC_AUTH
- Auth username: K2SQL:scim_user / Service Account
- Auth password: K2pass!
- Import action: (This field must be blank)
- Log SCIM requests and responses: ON
-
To Create a user in KeyCloack, select the Users and select Create user. From here enter the user's details and assigned groups.

Considerations
-
SharePoint OnPrem/Online login with K2 configured using OIDC is not supported
-
K2 Mobile Workspace using OIDC is not supported
-
We do not take responsibility for issues caused by the keycloak-scim provider or its compatibility with specific Keycloak versions. Customers use this third-party component at their own risk.
-
SCIM was tested with Keycloak v26.4.5 (latest at the time of Nintex Automation K2 (5.9) testing), and later versions v26.4.6 and v26.4.7 are not compatible due to a Keycloak defect that prepends a “/” to the user ID, causing user lookup to fail before any SCIM call is made.
-
Issue
The system returns errors such as “Signature validation failed” as seen in the image below
Cause
-
The user you are logged in with is not present in the K2 Identity.Identity table.
-
The claim type mapping is incorrect.
Resolution
-
Correct the OIDC configuration to have the correct claim type mapping.
-
Ensure the logged in user is present in the K2 Identity.Identity table
-
-
Issue
You cannot access Management after you enable OpenID Connect (OIDC).
Cause
Incorrect claim mappings or OIDC configuration prevent the system from authenticating the user.
Resolution
Extract OIDC preview from {K2 install location}\Setup\Features\ K2OIDC Preview.zip. Run the revert.ps1script included in the ConfigureOIDC package. This script updates the web.config files for the Runtime and Design Time sites, restoring them to the default Windows/Forms STS authentication used in a standard installation. This allows you to regain access to Management and correct any configuration issues.
To locate the ConfigureOIDC package:
- Extract the 5.9 installer executable.
- Navigate to the following folder: Installation\Apps
- Locate and open the K2 blackpearl Server.zip file.
- Inside the zip, navigate to: Build Output\Assemblies\Install\Features
- Extract the K2OIDC Preview.zip file.
- Open the extracted folder and locate the revert.ps1 script.
- Run the script using PowerShell. Once completed, you will be able to access Management and update the OIDC configuration as needed.
-
Issue
The system returns errors after upgrading to Nintex Automation K2 (5.9.1) when the OIDC preview feature from Nintex Automation K2 (5.9) remains configured.
Cause
Nintex Automation K2 (5.9.1) does not support the OIDC preview configuration. The upgrade leaves an unsupported configuration in place, which causes authentication failures.
ResolutionRevert the environment before configuring OIDC in Nintex Automation K2 (5.9.1). You will require your SQL server name and K2 Database name. Use the following steps to revert your environment.
-
Run the following script , BEFORE upgrading to Nintex Automation K2 (5.9.1). This will update the webconfig file.
-
After restoring access, configure OIDC using the steps above.
-