SCIM Integration Guide
Overview
SCIM (System for Cross-domain Identity Management) is a standard protocol that automates user and group management between your identity provider (IdP) — like Okta or Azure AD — and Testkube.
With SCIM, user provisioning and deprovisioning happen automatically:
- When a user is added to your organization in your IdP, they immediately receive access to Testkube.
- When a user is removed from your IdP, their Testkube access is revoked right away.
This removes the need for manual account management and ensures your organization stays in sync.
Key Benefits
- Automated provisioning – Users and groups are created and updated automatically.
- Team synchronization – IdP groups map directly to Testkube teams.
- Granular access control – Assign permissions to organizations, environments, and resource groups.
- Security compliance – Automatic deprovisioning keeps your org secure when users leave.
Quick Start
If you are using the on-prem version of Testkube, ensure SCIM is enabled in your deployment (see Configuration Reference below).
Step 1: Enable SCIM in Testkube
SCIM is configured per organization.
- In the Testkube dashboard, go to Organization Management → Product Features.
- Enable SCIM.
- Copy the SCIM API token that is generated — keep it safe, you’ll need it for authentication.
- Note your organization’s SCIM endpoint URL:
https://<testkube-domain>/organizations/<org_id>/scim
Step 2: Configure Your Identity Provider
In your IdP’s SCIM configuration:
- Base URL:
https://<testkube-domain>/organizations/<org_id>/scim
- Authentication: Bearer Token (use the SCIM API token from Step 1)
⚠️ The SCIM endpoint is organization-specific and will only manage users and teams for that organization.
⚠️ Testkube identifies users by email. Map your IdP's
userNameto the user's email address (for example,userPrincipalNamein Entra ID, or the Email field in Okta). IfuserNameis set to anything else, Testkube can't reliably match users, and you end up with duplicate accounts or updates that silently do nothing.
📘 The settings above are enough to connect. For full step-by-step setup — including how to assign roles and entitlements and which response format to use — follow the guide for your provider: Okta or Microsoft Entra ID (Azure AD).
Manage Permissions in Testkube
When SCIM is enabled, roles and resource assignments are controlled by your IdP via the roles and entitlements custom attributes.
The Manage permissions in Testkube checkbox lets admins manage these directly in Testkube instead, while SCIM still handles user and team provisioning.
Enable this in Organization Management → Product Features after enabling SCIM.
With this option enabled:
- SCIM still provisions/deprovisions users and syncs team membership.
rolesandentitlementsattributes from SCIM requests are ignored.- Admins assign organization roles, environment access, and resource group access in the Testkube dashboard.
This is useful in cases where custom attributes roles and entitlements cannot be defined on the IdP side.
Role Management
Testkube uses URNs (Uniform Resource Names) to define roles. A role URN specifies what permissions a user has for a particular resource.
All of the settings below are configured on your Identity Provider side, so each user should have a roles attribute containing an array of strings.
💡 Always reference environments and resource groups by their ID or slug, never their display name. A URN built from a display name won't match an existing resource, so the role is dropped. For entitlements it's worse: Testkube creates a brand-new resource with that name instead of using the one you meant.
Organization Roles
Example:
{
"roles": [
"urn:testkube:role:organization:my-org:admin"
]
}
Here my-org is your organization's ID or slug. Because the SCIM endpoint already targets a single organization, you can use * instead to mean "this organization" (see Wildcards below).
Available roles:
- owner – Full control over the organization and all resources
- admin – Manage organization settings, members, and teams
- biller – Manage billing and subscriptions
- member – Basic access without administrative privileges
Wildcards
You can use * for organization-wide roles:
{
"roles": [
"urn:testkube:role:organization:*:admin"
]
}
This grants admin in the current organization.
Environment Roles
Example:
{
"roles": [
"urn:testkube:role:environment:production:admin",
"urn:testkube:role:environment:staging:write",
"urn:testkube:role:environment:development:read"
]
}
Available roles:
- admin – Full control of the environment
- write – Run tests, edit configs, view results
- read – View-only access
Wildcards
Grant the same role in all environments:
{
"roles": [
"urn:testkube:role:environment:*:read"
]
}
Useful for:
- Auditors (read-only across all envs)
- Managers (visibility into all envs)
- New team members (default safe access)
- Service accounts (automation across environments)
Resource Group Roles
Example:
{
"roles": [
"urn:testkube:role:resourcegroup:infrastructure-tests:admin",
"urn:testkube:role:resourcegroup:api-tests:write"
]
}
Wildcards
{
"roles": [
"urn:testkube:role:resourcegroup:*:write"
]
}
Role Resolution Priority
If multiple roles could apply, Testkube uses this order:
- Exact ID match (highest priority) –
environment:env-123:admin - Slug match –
environment:production:write - Wildcard –
environment:*:read - System default (lowest) – usually
memberorread
Example:
{
"roles": [
"urn:testkube:role:environment:*:read",
"urn:testkube:role:environment:production:admin",
"urn:testkube:role:organization:*:member"
]
}
Result: User has read access everywhere, but full admin in production.
Entitlements
Entitlements assign users or teams to environments or resource groups. An entitlement grants membership with read access. For more than read access, also assign an environment or resource group role from Role Management.
All of the settings below are configured on your Identity Provider side, so each user should have an entitlements attribute containing an array of strings.
Example:
{
"entitlements": [
"urn:testkube:entitlement:environment:staging",
"urn:testkube:entitlement:environment:production",
"urn:testkube:entitlement:resourcegroup:api-tests"
]
}
💡 If an entitlement points to an environment or resource group that doesn't exist yet, Testkube creates it. To attach to an existing resource instead of creating a duplicate, reference it by its ID or slug, not its display name.
Roles and Entitlements Format
Identity providers don't agree on how to send multi-valued attributes like roles and entitlements. Testkube understands both shapes:
| Shape | Example | Used by |
|---|---|---|
| Simple (default) | ["urn:testkube:role:organization:*:admin"] | Okta and most providers |
| Complex (RFC 7643) | [{"value": "urn:testkube:role:organization:*:admin"}] | Microsoft Entra ID |
Testkube accepts both shapes on input, so creating and updating users always works. The setting only changes the shape Testkube uses in its responses — the shape your IdP reads back when it imports users or reconciles state.
Pick the shape your IdP expects, because the IdP parses Testkube's responses against its own schema and the wrong one breaks that read-back:
- Okta expects strings, so keep the default (simple). If you switch an Okta organization to complex, Okta's user import fails with
Invalid value data type— it receives objects where it expects strings. - Entra ID expects objects, so turn complex on. With the simple shape, Entra can't reconcile what it reads back against what it provisioned.
Turn complex on under Organization Management → Product Features → SCIM by checking Use RFC 7643 complex format for roles & entitlements. The setting is per organization, so point Okta at a simple-format organization and Entra at a complex-format one.
Example response with complex format on:
{
"roles": [
{"value": "urn:testkube:role:organization:*:admin"}
],
"entitlements": [
{"value": "urn:testkube:entitlement:environment:staging"}
]
}
Team (Group) Management
SCIM groups map directly to Testkube teams.
Example:
{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
"displayName": "QA Team",
"members": [
{"value": "user-id-1"},
{"value": "user-id-2"}
],
"roles": [
"urn:testkube:role:environment:*:write",
"urn:testkube:role:resourcegroup:*:write"
]
}
- All team members inherit the team’s roles.
- Adding/removing a user in the IdP updates their access in Testkube automatically.
Supported Operations
Testkube supports SCIM 2.0 with these operations:
User Operations
- CREATE – Add new users
- READ – Get user info
- UPDATE (PUT) – Replace all user data
- UPDATE (PATCH) – Update specific attributes
- DELETE – Remove users
Group Operations
- CREATE – Create new teams
- READ – Get team info
- UPDATE (PUT) – Replace all team data
- UPDATE (PATCH) – Add/remove team members
- DELETE – Delete teams
Configuration Reference
SaaS (Cloud)
- Enable SCIM in Organization Management → Product Features
- Copy your API Token
- Endpoint format:
https://<testkube-domain>/organizations/<org_id>/scim
On-Prem
Enable SCIM in your deployment.
Helm values:
testkube-cloud-api:
scim:
enabled: true
Environment variable:
SCIM_SERVER_ENABLED=true
Afterwards enable SCIM integration in the desired organization via the dashboard.
Troubleshooting
Users cannot log in
- Ensure user is provisioned via SCIM
- Check email matches IdP credentials
- Review IdP provisioning logs
Roles or entitlements not applied
- Make sure Manage permissions in Testkube is turned off. While it's on, Testkube ignores the
rolesandentitlementsattributes from SCIM. - Check the URN format:
urn:testkube:role:<scope>:<id-or-slug>:<role>andurn:testkube:entitlement:<scope>:<id-or-slug>. - Reference environments and resource groups by ID or slug, not display name.
- Look for
ignoring all SCIM roles: no value matched the expected formatin the control plane API logs. The warning lists the values it rejected and the format it expected, which usually points straight at a malformed URN. - Entra ID only: if a role comes through as a friendly name like
Admininstead of the URN, the app role's display name is still the friendly name. Entra sends the display name, not the value, so set the display name to the URN.
SCIM request failures
- Confirm bearer token is correct
- Review SCIM server logs in control plane api
- Verify endpoint is accessible from your network
Additional Resources
Integration Guides
Okta
This guide walks you through integrating Okta with Testkube for SCIM provisioning.
Prerequisites
- A Testkube Organization with SCIM enabled (SCIM Server Endpoint Bearer Token available in Testkube UI).
- Admin access to your Okta tenant.
Step 1. Log in to Okta Admin Portal
- Go to Okta Admin Console.
- Use an administrator account to sign in.
Step 2. Create a New Application Integration
- In the left sidebar, navigate to Applications → Applications.
- Click Create App Integration.
- Choose SWA – Secure Web Authentication.
- Set the Application username to Email.
- Save the new application.
Step 3. Enable SCIM Provisioning
- Open the newly created application in Okta.
- Go to General → click Edit.
- Under App Settings, enable SCIM Provisioning.
- Save changes.
Step 4. Configure SCIM Connector
- Navigate to the Provisioning tab.
- Click Integration then Edit.
- Enter the following details:
- SCIM connector base URL → copy from the Testkube SCIM settings.
- Authentication Mode → select HTTP Header.
- Bearer Token → paste the token from Testkube.
- Select all supported provisioning actions (Import New Users and Profile Updates, Push New Users, Push Profile Updates, Push Groups, Import Groups).
- Set Unique identifier field for users to email.
Step 5. Test Connector Configuration
- Click Test Connector Configuration.
- The test should be successful. If not, verify the SCIM URL and token from Testkube.
Step 6. Save & Finish
- Save the configuration.
- SCIM provisioning between Okta and Testkube is now active.
- You can now assign users and groups to this application, and they will be provisioned into Testkube automatically.
Defining Roles and Entitlements in Okta
When integrating Okta with Testkube via SCIM, you may want to assign additional roles (permissions) and entitlements (resource memberships) to users or groups.
This is done by defining extra attributes in Okta and mapping them to Testkube.
Step 1. Add Custom Attributes in Okta
- In the Okta Admin Console, go to Directory → Profile Editor.
- Select the SCIM Application you created.
- Click Add Attribute.
- Create the following attributes:
- roles (type: string, array supported)
- entitlements (type: string, array supported)
💡 When creating the additional attributes, make sure the
external namespaceis set tourn:ietf:params:scim:schemas:core:2.0:User.
💡 You can also edit an individual user under Directory → People → Select a User → Profile → Edit Attributes and directly add these fields there for testing.
Step 2. Map Attributes to the SCIM App
- Still in Profile Editor, select the Mappings tab.
- Ensure the new attributes are mapped:
- From Okta User → Created SCIM Application
- And optionally back from Created SCIM Application → Okta User (if you want to sync values both ways).
- Save the mappings.
Step 3. Set the Values on Users or Groups
Mapping the attributes only tells Okta where to send them — you still set the actual URN values:
- Per user: go to Directory → People, open a user, then Profile → Edit Attributes, and set
rolesandentitlementsto the Testkube URNs (for example,urn:testkube:role:organization:*:adminandurn:testkube:entitlement:environment:staging). - For many users at once: set the values on an Okta group, then push the group to the app so everyone in it inherits the same roles and entitlements.
Okta sends the values to Testkube on the next sync, or right away when you assign the user to the app.
Microsoft Entra ID (Azure AD)
This guide integrates Microsoft Entra ID with Testkube for SCIM provisioning. Entra sends the complex attribute format, so turn on complex format for the organization first (see Roles and Entitlements Format).
Prerequisites
- A Testkube Organization with SCIM enabled and Use RFC 7643 complex format turned on.
- The organization's SCIM endpoint URL and bearer token from the Testkube UI.
- Admin access to your Entra tenant.
Step 1. Create the Enterprise Application
- In the Microsoft Entra admin center, go to Enterprise applications → New application.
- Click Create your own application, name it (for example,
Testkube SCIM), and choose Integrate any other application you don't find in the gallery (Non-gallery).
Step 2. Connect Provisioning
- Open the app, go to Provisioning, and set Provisioning Mode to Automatic.
- Under Admin Credentials, enter:
- Tenant URL → your Testkube SCIM endpoint:
https://<testkube-domain>/organizations/<org_id>/scim - Secret Token → the Testkube SCIM bearer token.
- Tenant URL → your Testkube SCIM endpoint:
- Click Test Connection. It should succeed; then save the configuration.
Step 3. Match Users by Email
Go to Provisioning → Mappings → Provision Microsoft Entra ID Users and confirm that userName is mapped from userPrincipalName and is set as the matching attribute. Testkube matches users by email, so this mapping is required.
Step 4. Send Roles
Entra builds the roles value from a user's app role assignment, and it sends the app role's display name, not its value. So the display name has to be the Testkube role URN.
- In App registrations, open your app (the non-gallery app you created also appears here), go to App roles, and create a role:
- Display name → the Testkube URN, for example
urn:testkube:role:organization:*:admin - Value → the same URN
- Allowed member types → Users/Groups
- Display name → the Testkube URN, for example
- Back in the app's Provisioning → Mappings, click Add New Mapping:
- Mapping type → Expression
- Expression →
SingleAppRoleAssignment([appRoleAssignments]) - Target attribute →
roles[primary eq "True"].value
- Go to Users and groups, add a user, and assign the app role you created.
Step 5. Send Entitlements (optional)
Entra has no built-in source for entitlements, and entitlements isn't in its default attribute list. To send them, open Provisioning → Mappings → Show advanced options → Edit attribute list, add entitlements, then map it from a constant value or a directory extension attribute that holds the URN. For most setups, granting environment and resource group access through roles (Step 4) is simpler than entitlements.
Step 6. Provision
Use Provision on demand to push a single user immediately, or Start provisioning for the scheduled sync. Confirm the user appears in Testkube with the expected role.