Skip to content

Single Sign-On (SSO) Setup

SSO lets your organization authenticate DataRecs users through your corporate Identity Provider instead of the default email/password flow. Once enabled, user lifecycle management — creation, profile updates, deactivation — can be handled automatically via SCIM provisioning.

Centralised authentication

Users sign in through your corporate IdP (Entra ID, Okta, Google Workspace) using OIDC. No separate DataRecs passwords to manage.

Automatic user provisioning

SCIM 2.0 integration pushes user creation, updates, and deactivation from your IdP to DataRecs in real time.

Group management

IdP groups sync to DataRecs via SCIM, giving you centralised control over team membership and workspace access.

Break-glass access

Designated administrators retain legacy login access in case the IdP is unavailable or misconfigured.

ProviderSSO (OIDC)SCIM 2.0 provisioning
Microsoft Entra ID
Okta
OneLogin
Google Workspace
  • Authentication: Users log in via your IdP instead of email/password. The DataRecs login page redirects to your IdP’s authorization endpoint.
  • User lifecycle: If SCIM is configured, your IdP manages user creation, profile updates, and deactivation. Manual user management in DataRecs still works alongside SCIM.
  • Break-glass admins: Designated owner/admin accounts retain access to the legacy login path, ensuring you can always reach the platform even if the IdP is down.
  • Existing data: Roles, permissions, workspaces, jobs, and all other data are unaffected. Nothing is deleted or modified during migration.
  • OIDC Authorization Code Flow with PKCE — the authorization code is exchanged for tokens using a code verifier, preventing interception attacks.
  • SCIM bearer token authentication — tokens follow the format dtrcs-scim:{token_id}:{secret} and are hashed with argon2id before storage. The plaintext is never persisted.
  • Envelope encryption — all stored SSO credentials (client ID, client secret, issuer URL) are envelope-encrypted using the tenant’s dedicated encryption key in HashiCorp Vault.
  • Ephemeral OIDC statestate, nonce, and code_verifier parameters are stored in NATS KV with a 5-minute TTL and deleted immediately after use.

Before you begin, confirm you have:

  • Tenant owner or admin role in DataRecs.
  • Admin access to your Identity Provider:
    • Microsoft Entra ID: Global Administrator or Application Administrator
    • Okta: Super Admin
    • Google Workspace: Admin with access to Google Cloud Console
  • The DataRecs callback URL for your environment:
    https://{your-datarecs-api-domain}/auth/sso/callback
  • The DataRecs SCIM endpoint (if configuring provisioning):
    https://{your-datarecs-api-domain}/scim/v2

Step 1 — Configure your Identity Provider

Section titled “Step 1 — Configure your Identity Provider”

Register DataRecs as an application in your IdP. The exact steps depend on your provider.

  1. Go to Microsoft Entra admin centerIdentityApplicationsApp registrationsNew registration.
  2. Set the Name to something recognisable, e.g. DataRecs SSO.
  3. Under Supported account types, select Accounts in this organizational directory only (single tenant).
  4. Under Redirect URI, select Web and enter:
    https://{your-datarecs-api-domain}/auth/sso/callback
  5. Click Register.
  6. On the Overview page, note the Application (client) ID and Directory (tenant) ID.
  7. Go to Certificates & secretsNew client secret. Set an expiry and click Add. Copy the Value immediately — it is only shown once.
  8. Go to API permissions → verify that User.Read (Delegated) is listed. If not, add it. Click Grant admin consent for {your org}.
  1. Go to Enterprise applicationsNew applicationCreate your own application.
  2. Select Integrate any other application you don’t find in the gallery (Non-gallery) and name it DataRecs SCIM Provisioning.
  3. Open the new application and go to Provisioning → set Provisioning Mode to Automatic.
  4. Under Admin Credentials, enter:
    • Tenant URL: https://{your-datarecs-api-domain}/scim/v2
    • Secret Token: the SCIM bearer token from DataRecs (generated in Step 2)
  5. Click Test Connection to verify connectivity, then Save.
  6. Under Mappings, configure attribute mappings for users and groups as needed.
  7. Set Provisioning Status to On and save.

Values you’ll need for DataRecs:

  • Application (client) ID
  • Directory (tenant) ID
  • Client secret value

Step 2 — Create the SSO connection in DataRecs

Section titled “Step 2 — Create the SSO connection in DataRecs”

With your IdP configured, create the SSO connection in DataRecs and link it to your tenant.

  1. Navigate to Settings → SSO → Configure SSO.
  2. Select your Identity Provider (Microsoft Entra ID, Okta, Google Workspace, or OneLogin).
  3. Enter the credentials from Step 1 (client ID, client secret, and tenant/directory ID if applicable).
  4. Click Save.
  5. DataRecs generates a SCIM bearer token and displays it once. Copy it immediately and store it securely — you will not see it again.
Section titled “Step 3 — Configure SCIM provisioning (recommended)”

SCIM (System for Cross-domain Identity Management) automates user lifecycle management between your IdP and DataRecs. When configured, your IdP pushes changes to DataRecs in real time:

  • User creation — new IdP users are automatically provisioned in DataRecs.
  • Profile updates — name and email changes sync automatically.
  • Deactivation — disabled or removed IdP users are deactivated in DataRecs.
  • Group management — IdP group memberships sync to DataRecs groups.

The token generated in Step 2 follows the format:

dtrcs-scim:{token_id}:{secret}

This is the value you enter as the bearer token / API token / secret token in your IdP’s provisioning configuration.

Enter this as the Tenant URL or Base URL in your IdP:

https://{your-datarecs-api-domain}/scim/v2

Refer back to the SCIM provisioning instructions in Step 1 for your specific provider. In summary:

  • Entra ID: Enterprise application → Provisioning → Admin Credentials → Secret Token
  • Okta: SCIM app → Provisioning → API Integration → API Token
  • OneLogin: SCIM app → Configuration → SCIM Bearer Token (without Bearer prefix)
ResourceOperations
UsersPOST, GET, PUT, PATCH, DELETE
GroupsPOST, GET, PATCH, DELETE
ServiceProviderConfigGET
ResourceTypesGET
SchemasGET

You can validate the OIDC flow before committing to migration. The test creates a session but does not change your tenant’s authentication mode.

  1. In the Console, go to Settings → SSO.
  2. Click Test SSO Connection.
  3. A new browser window opens and redirects to your IdP’s login page.
  4. Sign in with a valid account from your directory.
  5. If successful, you are redirected back to the SSO settings page with a confirmation message.

If the test fails, check:

  • The redirect URI in your IdP matches https://{your-datarecs-api-domain}/auth/sso/callback exactly.
  • The client ID and client secret are correct.
  • Admin consent has been granted (Entra ID).
  • The user is assigned to the application (Okta).

Step 5 — Designate break-glass administrators

Section titled “Step 5 — Designate break-glass administrators”

Break-glass administrators can log in via the legacy authentication path even after SSO is enabled. This ensures you can always access the platform if your IdP is unavailable or the SSO connection is misconfigured.

At least one user with the owner or admin role must be designated as a break-glass administrator before migration can proceed.

  1. Go to User Management.
  2. Click on the user you want to designate.
  3. In the Identity panel, click Grant Break-glass Access.
  4. Confirm the action.

Once you have an active SSO connection, SCIM provisioning configured (optional), and at least one break-glass admin designated, you can migrate your tenant to SSO authentication.

  1. In the Console, go to Settings → SSO.
  2. The pre-migration checklist shows your current state: active user count, break-glass accounts, and any warnings.
  3. Review the checklist and click Confirm Migration.
  4. The migration runs as a background job that:
    • Validates preconditions (active SSO connection, break-glass admin exists, current auth mode is workos)
    • Canonicalises all active user email addresses
    • Validates no duplicate emails or identity bindings exist
    • Flips the tenant’s auth_mode from workos to sso
  5. Once complete, all users must log in via the IdP.
  6. Break-glass administrators retain access to the legacy login path at /auth/legacy.
  • Existing users are not deleted or modified. Roles, permissions, workspace memberships, and all associated data remain intact.
  • On first SSO login, each user is matched by their canonical email address and linked to their IdP identity (idp_subject). This binding is stored and used for all subsequent logins.
  • If SCIM is configured, your IdP can push profile updates, provision new users, and manage group memberships going forward.
  • Existing manually-created groups are unaffected. SCIM-provisioned groups appear alongside them and are tagged with source='scim' for easy identification.

Admin tools for handling edge cases after migration:

ActionWhat it doesWhen to use
Reset Identity BindingClears the stored idp_subject so the user can be relinked on next SSO login.A user’s IdP account was deleted and recreated with a new subject identifier.
Archive UserSoft-deletes the user, freeing their email address for reprovisioning.An employee leaves and their email will be reassigned to a new hire.
Full RelinkClears both idp_subject and external_id for a complete identity reset.The user needs to be fully unlinked from their previous IdP identity (e.g. IdP migration).

These actions are available in the Console under User Management → {user} → Identity panel, or via the REST API.

  • All SSO connection credentials (client_id, client_secret, issuer_url) are envelope-encrypted at rest using the tenant’s dedicated encryption key in HashiCorp Vault.
  • SCIM bearer tokens are hashed with argon2id before storage. The plaintext token is never persisted.
  • OIDC state parameters (state, nonce, code_verifier) are stored in NATS KV with a 5-minute TTL and deleted immediately after use to prevent replay attacks.
  • ID tokens are verified using the IdP’s JWKS (JSON Web Key Set) public keys, with automatic key rotation support.
  • The email domain is deterministically encrypted for lookup, preventing cross-tenant data leakage.
  • All SSO and SCIM operations emit audit events for compliance tracking.
Error codeMeaningResolution
SSO_NOT_CONFIGUREDNo active SSO connection exists for the email domain.Verify the SSO connection is active in Settings → SSO.
SSO_IDENTITY_MISMATCHThe IdP subject has changed for an existing user.An admin needs to reset the identity binding (see Identity recovery).
BREAK_GLASS_REQUIREDNo break-glass administrator is designated.Designate at least one owner/admin before migrating (see Step 5).
INVALID_STATEThe authentication session expired (5-minute TTL).Try the login again. If persistent, check for clock skew between your network and DataRecs.
IDP_DISCOVERY_FAILEDCannot reach the IdP’s OIDC discovery endpoint.Verify the issuer URL is correct and the IdP’s /.well-known/openid-configuration endpoint is reachable.
SCIM 401 UnauthorizedThe SCIM bearer token is invalid or expired.Rotate the SCIM token and update the value in your IdP’s provisioning configuration.