Single Sign-On (SSO)

Single Sign-On lets your team sign in to Sim through your company's identity provider instead of managing separate passwords. Sim supports both OIDC and SAML 2.0, and an organization can use more than one identity provider at a time, one per verified domain.


Before you start

Verify your email domain first. SSO cannot be saved until the domain shows as Verified, and DNS changes take time to propagate.

The verified domain is what authorizes your identity provider. Removing it later immediately disables SSO sign-in for everyone on that domain until it is verified again.

Decide your Provider ID before configuring your identity provider. It becomes part of the callback URL you register there, and it is fixed once saved — changing it later means deleting the provider and setting it up again.


Setup

1. Open SSO settings

Go to Settings → Organization → Single sign-on. The page has three tabs:

TabManage
Sign-inOIDC or SAML configuration, callback URLs, and first-sign-in membership
DomainsDNS verification shared by SSO and SCIM
ProvisioningSCIM connection, tokens, rules, group mappings, and activity

Use Domains to verify ownership, then return to Sign-in to configure your provider. Switching tabs preserves an unsaved sign-in draft while you stay on this page; use Save or Update to commit it. The selected tab and provider are included in the URL, so they can be bookmarked or shared. On self-hosted deployments, Provisioning appears when SCIM is enabled.

An organization can run several identity providers at once, each serving a different verified domain: Okta for eng.acme.com and Microsoft Entra ID for acme.com, for example. Sign-in lists them; select Add identity provider for another, or a row to view, edit, or delete one. Sim routes each sign-in by the email domain, so a domain routes to exactly one provider.

2. Choose a protocol

ProtocolUse when
OIDCYour IdP supports OpenID Connect — Okta, Microsoft Entra ID, Auth0, Google Workspace
SAML 2.0Your IdP is SAML-only — ADFS, Shibboleth, or older enterprise IdPs

3. Fill in the form

Fields required for both protocols:

FieldWhat to enter
Provider IDA short slug identifying this connection. Letters, numbers, and dashes only. It must be unique across every Sim organization, so include something specific to you, such as azure-ad-acme. If the ID is taken, Sim asks you to choose another.
Issuer URLThe identity provider's issuer URL. Must be HTTPS.
DomainYour organization's email domain, e.g. company.com. Users with this domain will be routed through SSO at sign-in.
First sign-in → On first SSO sign-inAutomatic adds a user authenticated through this verified SSO connection to the organization as a Member and consumes a billed seat. Team seat counts grow with membership; fixed-seat plans require available capacity. Invite only authenticates the user without creating organization membership. Neither mode grants workspace access automatically.

OIDC additional fields:

FieldWhat to enter
Client IDThe application client ID from your IdP.
Client secretThe client secret from your IdP.
ScopesUnder Advanced options. Comma-separated OIDC scopes; default: openid,profile,email.

For OIDC, Sim automatically fetches endpoints (authorization_endpoint, token_endpoint, userinfo_endpoint, jwks_uri) from your issuer's /.well-known/openid-configuration discovery document. You only need to provide the issuer URL.

SAML additional fields:

FieldWhat to enter
Entry point URLThe IdP's SSO service URL where Sim sends authentication requests.
Identity provider certificateThe Base-64 encoded X.509 certificate from your IdP for verifying assertions.

4. Copy the callback URL

Copy Callback URL for OIDC or ACS URL (Reply URL) for SAML. This is the endpoint that receives your identity provider's authentication response. Register it in your IdP before saving. If you set a SAML Callback URL override under Advanced options, the copyable ACS URL uses that override.

OIDC providers (Okta, Microsoft Entra ID, Google Workspace, Auth0):

https://<your-sim-domain>/api/auth/sso/callback/{provider-id}

SAML providers (ADFS, Shibboleth):

https://<your-sim-domain>/api/auth/sso/saml2/callback/{provider-id}

5. Save and test

Click Save. To test, sign out and use the Sign in with SSO button on the login page. Enter an email address at your configured domain — Sim will redirect you to your identity provider.


Editing and advanced configuration

For a saved connection, open Sign-in, select the provider, and select Edit. The Provider ID remains fixed. Delete removes that sign-in path only: accounts and memberships it admitted stay, and people at its domain sign in another way until a provider serves the domain again. A saved OIDC client secret appears as a mask with a suffix when available; Replace lets you enter a new secret, and Keep saved cancels that replacement. Select Update to save the provider, or Discard to abandon changes.

Advanced options contains OIDC scopes and optional authorization, token, and JWKS endpoint overrides. For SAML, it contains Audience, Callback URL override, signed-assertion requirements, NameID format, and optional IdP metadata XML. Attribute mapping lets either protocol override the email, name, and stable user-ID claim names. Leave a mapping blank to use the protocol default.

SCIM settings save immediately in the Provisioning tab. Its Disable just-in-time provisioning rule overrides Automatic first-sign-in membership while the connection is active and entitled. Existing members can still sign in. See directory provisioning.

Follow the Okta or Microsoft Entra provisioning walkthrough to connect a SCIM app and verify synchronization separately from sign-in.

Provider Guides

Okta (OIDC)

In Okta (official docs):

  1. Go to Applications → Create App Integration
  2. Select OIDC - OpenID Connect, then Web Application
  3. Set the Sign-in redirect URI to your Sim callback URL:
    https://<your-sim-domain>/api/auth/sso/callback/okta
  4. Under Assignments, grant access to the relevant users or groups
  5. Copy the Client ID and Client Secret from the app's General tab
  6. Copy your Okta organization domain from the account menu in the Admin Console, e.g. dev-1234567.okta.com. The Admin Console's -admin hostname is a different URL. See Find your Okta domain.

In Sim:

FieldValue
Provider TypeOIDC
Provider IDokta
Issuer URLhttps://dev-1234567.okta.com
Domaincompany.com
Client IDFrom Okta app
Client SecretFrom Okta app

For ordinary OIDC sign-in, use your Okta organization issuer as shown. A custom authorization server requires API Access Management; its issuer is https://<your-okta-domain>/oauth2/<authorization-server-id>. The default custom server is included in Okta's Integrator Free Plan but is not available in every production organization. See Okta's authorization server guide.

Microsoft Entra ID (OIDC)

In Azure (official docs):

  1. Go to Microsoft Entra ID → App registrations → New registration
  2. Under Redirect URI, select Web and enter your Sim callback URL, using the Provider ID you chose:
    https://<your-sim-domain>/api/auth/sso/callback/azure-ad-acme
  3. After registration, go to Certificates & secrets → New client secret and copy the value immediately — it won't be shown again
  4. Go to Overview and copy the Application (client) ID and Directory (tenant) ID
  5. Keep email in Sim's OIDC scopes. On Entra's v2.0 endpoint, this scope requests the email claim; alternatively, add email under Token configuration → Add optional claim → ID. Confirm the account supplies an email in your verified domain: a user principal name is not necessarily that email, and the claim is not guaranteed for every account. See Microsoft's ID token claims reference
  6. If Enterprise applications → Sim → Properties → Assignment required is Yes, assign the users or groups who should sign in. Microsoft rejects unassigned users before they reach Sim

In Sim:

FieldValue
Provider TypeOIDC
Provider IDazure-ad-acme (must be globally unique)
Issuer URLhttps://login.microsoftonline.com/{tenant-id}/v2.0
Domaincompany.com
Client IDApplication (client) ID
Client SecretSecret value

Microsoft Entra ID (SAML 2.0)

Use this when your tenant is configured for SAML rather than OIDC. Both are supported; OIDC is simpler if you have the choice.

In Azure (official docs):

  1. Go to Enterprise applications → New application → Create your own application, choose Integrate any other application you don't find in the gallery
  2. Open Single sign-on and select SAML
  3. Edit Basic SAML Configuration and set both values from Sim's SSO settings page:
    • Identifier (Entity ID) — the SP Entity ID field
    • Reply URL (Assertion Consumer Service URL) — the ACS URL (Reply URL) field
  4. Under Attributes & Claims, confirm the default claims are present. Sim reads the standard schema claim URIs for email, name, and name identifier
  5. Under SAML Certificates, download Certificate (Base64). Its contents go in Sim's required Identity provider certificate field. You can optionally also download Federation Metadata XML and paste it into Sim's IdP metadata XML field under Advanced options — it does not replace the certificate
  6. From the Set up panel for your application, copy the Login URL and the Microsoft Entra Identifier
  7. Under Users and groups, assign the people who should be able to sign in — Microsoft rejects unassigned users before they reach Sim

In Sim:

FieldValue
Provider TypeSAML
Provider IDazure-ad-acme (must be globally unique)
Issuer URLMicrosoft Entra Identifier, e.g. https://sts.windows.net/{tenant-id}/
Domaincompany.com
Entry point URLLogin URL from Entra
Identity provider certificateContents of the Base64 certificate

The Identifier (Entity ID) you set in Entra is what Sim validates the assertion's audience against. If it does not match the SP Entity ID shown in Sim exactly, sign-in fails with an audience mismatch.

Google Workspace (OIDC)

In Google Cloud Console (official docs):

  1. Go to APIs & Services → Credentials → Create Credentials → OAuth 2.0 Client ID
  2. Set the application type to Web application
  3. Add your Sim callback URL to Authorized redirect URIs:
    https://<your-sim-domain>/api/auth/sso/callback/google-workspace
  4. Copy the Client ID and Client Secret

In Sim:

FieldValue
Provider TypeOIDC
Provider IDgoogle-workspace
Issuer URLhttps://accounts.google.com
Domaincompany.com
Client IDFrom Google Cloud Console
Client SecretFrom Google Cloud Console

To restrict sign-in to your Google Workspace domain, configure the OAuth consent screen and ensure your app is set to Internal (Workspace users only) under User type. Setting the app to Internal limits access to users within your Google Workspace organization.

ADFS (SAML 2.0)

In ADFS (official docs):

  1. Open AD FS Management → Relying Party Trusts → Add Relying Party Trust
  2. Choose Claims aware, then Enter data about the relying party manually
  3. Set the Relying party identifier (Entity ID) to the SP Entity ID shown in Sim's SSO settings. SAML compares the assertion's audience against it, so it must match exactly:
    https://www.sim.ai
  4. Add an endpoint: SAML Assertion Consumer Service (HTTP POST) with the URL:
    https://<your-sim-domain>/api/auth/sso/saml2/callback/adfs
  5. Export the Token-signing certificate from Certificates: right-click → View Certificate → Details → Copy to File, choose Base-64 encoded X.509 (.CER). Paste the file's text into Identity provider certificate, including the certificate header and footer.
  6. Note the ADFS Federation Service endpoint URL (e.g. https://adfs.company.com/adfs/ls)

In Sim:

FieldValue
Provider TypeSAML
Provider IDadfs
Issuer URLhttps://adfs.company.com/adfs/services/trust (the ADFS Federation Service identifier)
Domaincompany.com
Entry point URLhttps://adfs.company.com/adfs/ls
Identity provider certificateContents of the exported Base64 certificate

The Issuer URL is the identity provider's own identifier, found in ADFS under Service → Federation Service Properties → Federation Service identifier. It is not Sim's URL — Sim's identifier is the SP Entity ID shown in the SSO settings, which you register in ADFS as the relying party identifier.

Sim requires this field to use https. ADFS often defaults its Federation Service identifier to an http:// URI; if yours does, change it to https in ADFS so both sides agree.


How sign-in works after setup

Once SSO is configured, users with your domain (company.com) can sign in through your identity provider:

  1. User goes to sim.ai and clicks Sign in with SSO
  2. They enter their work email (e.g. alice@company.com)
  3. Sim looks up the provider that serves company.com and redirects them to it
  4. After authenticating, they are returned to Sim
  5. If First sign-in is Automatic, Sim adds them to the organization as a Member, growing a Team seat count or validating available fixed-seat capacity
  6. They land in an accessible workspace, or see a clear no-access state until an admin grants workspace access

With Automatic provisioning, no invitation is required for organization membership. The join follows the organization's seat policy and does not infer a role from IdP claims: every newly provisioned user starts as a Member. Team subscriptions grow their billed seat count with membership; fixed-seat plans reject the join when capacity is full. With Invite only, SSO proves identity but does not create new membership or workspace access; new access must be granted separately, while existing organization membership and workspace access remain available.

Start SAML sign-in from Sim's Sign in with SSO flow. Sim rejects unsolicited SAML assertions, so an IdP-initiated SAML test from an app portal can fail even when the configuration is correct.

SSO provisioning creates internal organization members but does not grant workspace access. To grant workspace access from your identity provider, use directory provisioning and map a pushed group to a workspace. External workspace members are different: they are invited to a specific workspace without joining your organization or consuming one of your seats. Existing invitations and external access take precedence over automatic provisioning so their intended role and workspace grants are preserved.

Password-based login remains available. Forcing all organization members to use SSO exclusively is not yet supported.


Common Questions

Any identity provider that supports OIDC or SAML 2.0. This includes Okta, Microsoft Entra ID (Azure AD), Google Workspace, Auth0, OneLogin, JumpCloud, Ping Identity, ADFS, Shibboleth, and more.
The domain (e.g. company.com) is how Sim routes users to the right identity provider. When a user enters their email on the SSO sign-in page, Sim matches their email domain to the provider that serves it and redirects them there. Each verified domain routes to one provider, and an organization can serve different domains with different providers.
Yes. Add one provider per verified domain: for example Okta for eng.acme.com and Microsoft Entra ID for acme.com. Sign-in routes by email domain, so a single domain cannot be split across two providers. SCIM provisioning stays organization-wide and works alongside any number of providers.
No. For OIDC providers, Sim automatically fetches the authorization, token, and JWKS endpoints from the discovery document at {issuer}/.well-known/openid-configuration. You only need to provide the issuer URL.
Sim creates or links their account. If first-sign-in provisioning is Automatic and a seat is available, Sim adds them to your organization as a Member; no manual organization invite is needed. Workspace access is always granted separately. If provisioning is Invite only, or the user already has a pending invitation or external workspace access, Sim preserves that flow instead of creating membership automatically.
When [directory provisioning](/platform/enterprise/scim) sends a deactivation, Sim blocks sign-in and personal API keys while preserving ownership. Shared workspace keys keep working. With SSO alone, disabling the IdP account only blocks future SSO authentication; remove the member in Sim as part of offboarding.
Yes. Enabling SSO does not disable password-based login. Users can still sign in with their email and password if they have one. Forced SSO (requiring all users on the domain to use SSO) is not yet supported.
Sim links the SSO identity to that account automatically. Linking is authorized by your verified domain: because you proved ownership of the domain before configuring SSO, Sim treats your identity provider as authoritative for email addresses on it. This works for OIDC and SAML without requiring an email_verified claim. Matching uses the address sent as email; Sim does not resolve different aliases or user principal names to an existing account. If the asserted address differs from the existing account, Sim treats it as a separate account.
Organization owners and admins can configure SSO. You must be on the Enterprise plan.
The Callback URL (also called Redirect URI or ACS URL) is the endpoint in Sim that receives the authentication response from your identity provider. Use your own deployment's domain — on Sim Cloud that is www.sim.ai. For OIDC providers it follows the format: https://<your-sim-domain>/api/auth/sso/callback/{provider-id}. For SAML providers it is: https://<your-sim-domain>/api/auth/sso/saml2/callback/{provider-id}. You must register this URL in your identity provider before SSO will work.
Open Settings → Organization → Single sign-on → Sign-in, select the provider, and select Edit. Change the fields and select Update. The Provider ID cannot be changed; replacing it means deleting the provider and adding a new one.

Self-hosted setup

Self-hosted deployments use environment variables instead of the billing/plan check.

Environment variables

# Required
SSO_ENABLED=true
NEXT_PUBLIC_SSO_ENABLED=true

# Optional: directory provisioning (SCIM), configured from Single sign-on → Provisioning
SCIM_ENABLED=true
NEXT_PUBLIC_SCIM_ENABLED=true

# Required if you want users auto-added to your organization on first SSO sign-in
ORGANIZATIONS_ENABLED=true
NEXT_PUBLIC_ORGANIZATIONS_ENABLED=true

# Optional: comma-separated provider IDs to trust for automatic account linking.
# This applies to non-SSO providers only — SSO linking is authorized by the
# verified domain on the provider itself, not by this list.
SSO_TRUSTED_PROVIDER_IDS=custom-oidc,partner-saml

When someone signs in with SSO and an account with the same email already exists (for example, they previously signed up with email/password), Sim links the SSO identity to that account automatically. That linking is authorized by the verified domain attached to the provider, so it works for both OIDC and SAML and does not depend on your IdP asserting email_verified.

You can register providers through the Settings UI (same as cloud) or by running the registration script directly against your database.

Script-based registration

Use this when you need to register an SSO provider without going through the UI — for example, during initial deployment or CI/CD automation.

# OIDC example (Okta)
SSO_ENABLED=true \
NEXT_PUBLIC_APP_URL=https://your-instance.com \
SSO_PROVIDER_TYPE=oidc \
SSO_PROVIDER_ID=okta \
SSO_ISSUER=https://dev-1234567.okta.com \
SSO_DOMAIN=company.com \
SSO_USER_EMAIL=admin@company.com \
SSO_OIDC_CLIENT_ID=your-client-id \
SSO_OIDC_CLIENT_SECRET=your-client-secret \
bun run packages/db/scripts/register-sso-provider.ts
# SAML example (ADFS)
SSO_ENABLED=true \
NEXT_PUBLIC_APP_URL=https://your-instance.com \
SSO_PROVIDER_TYPE=saml \
SSO_PROVIDER_ID=adfs \
SSO_ISSUER=https://adfs.company.com/adfs/services/trust \
SSO_SAML_AUDIENCE=https://your-instance.com \
SSO_DOMAIN=company.com \
SSO_USER_EMAIL=admin@company.com \
SSO_SAML_ENTRY_POINT=https://adfs.company.com/adfs/ls \
SSO_SAML_CERT="-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----" \
bun run packages/db/scripts/register-sso-provider.ts

The script outputs the callback URL to configure in your IdP once it completes.

To remove a provider:

SSO_USER_EMAIL=admin@company.com \
bun run packages/db/scripts/deregister-sso-provider.ts