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:
| Tab | Manage |
|---|---|
| Sign-in | OIDC or SAML configuration, callback URLs, and first-sign-in membership |
| Domains | DNS verification shared by SSO and SCIM |
| Provisioning | SCIM 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
| Protocol | Use when |
|---|---|
| OIDC | Your IdP supports OpenID Connect — Okta, Microsoft Entra ID, Auth0, Google Workspace |
| SAML 2.0 | Your IdP is SAML-only — ADFS, Shibboleth, or older enterprise IdPs |
3. Fill in the form
Fields required for both protocols:
| Field | What to enter |
|---|---|
| Provider ID | A 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 URL | The identity provider's issuer URL. Must be HTTPS. |
| Domain | Your 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-in | Automatic 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:
| Field | What to enter |
|---|---|
| Client ID | The application client ID from your IdP. |
| Client secret | The client secret from your IdP. |
| Scopes | Under 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:
| Field | What to enter |
|---|---|
| Entry point URL | The IdP's SSO service URL where Sim sends authentication requests. |
| Identity provider certificate | The 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):
- Go to Applications → Create App Integration
- Select OIDC - OpenID Connect, then Web Application
- Set the Sign-in redirect URI to your Sim callback URL:
https://<your-sim-domain>/api/auth/sso/callback/okta - Under Assignments, grant access to the relevant users or groups
- Copy the Client ID and Client Secret from the app's General tab
- Copy your Okta organization domain from the account menu in the Admin Console, e.g.
dev-1234567.okta.com. The Admin Console's-adminhostname is a different URL. See Find your Okta domain.
In Sim:
| Field | Value |
|---|---|
| Provider Type | OIDC |
| Provider ID | okta |
| Issuer URL | https://dev-1234567.okta.com |
| Domain | company.com |
| Client ID | From Okta app |
| Client Secret | From 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):
- Go to Microsoft Entra ID → App registrations → New registration
- 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 - After registration, go to Certificates & secrets → New client secret and copy the value immediately — it won't be shown again
- Go to Overview and copy the Application (client) ID and Directory (tenant) ID
- Keep
emailin 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 - 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:
| Field | Value |
|---|---|
| Provider Type | OIDC |
| Provider ID | azure-ad-acme (must be globally unique) |
| Issuer URL | https://login.microsoftonline.com/{tenant-id}/v2.0 |
| Domain | company.com |
| Client ID | Application (client) ID |
| Client Secret | Secret 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):
- Go to Enterprise applications → New application → Create your own application, choose Integrate any other application you don't find in the gallery
- Open Single sign-on and select SAML
- 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
- Under Attributes & Claims, confirm the default claims are present. Sim reads the standard schema claim URIs for email, name, and name identifier
- 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
- From the Set up panel for your application, copy the Login URL and the Microsoft Entra Identifier
- Under Users and groups, assign the people who should be able to sign in — Microsoft rejects unassigned users before they reach Sim
In Sim:
| Field | Value |
|---|---|
| Provider Type | SAML |
| Provider ID | azure-ad-acme (must be globally unique) |
| Issuer URL | Microsoft Entra Identifier, e.g. https://sts.windows.net/{tenant-id}/ |
| Domain | company.com |
| Entry point URL | Login URL from Entra |
| Identity provider certificate | Contents 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):
- Go to APIs & Services → Credentials → Create Credentials → OAuth 2.0 Client ID
- Set the application type to Web application
- Add your Sim callback URL to Authorized redirect URIs:
https://<your-sim-domain>/api/auth/sso/callback/google-workspace - Copy the Client ID and Client Secret
In Sim:
| Field | Value |
|---|---|
| Provider Type | OIDC |
| Provider ID | google-workspace |
| Issuer URL | https://accounts.google.com |
| Domain | company.com |
| Client ID | From Google Cloud Console |
| Client Secret | From 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):
- Open AD FS Management → Relying Party Trusts → Add Relying Party Trust
- Choose Claims aware, then Enter data about the relying party manually
- 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 - Add an endpoint: SAML Assertion Consumer Service (HTTP POST) with the URL:
https://<your-sim-domain>/api/auth/sso/saml2/callback/adfs - 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.
- Note the ADFS Federation Service endpoint URL (e.g.
https://adfs.company.com/adfs/ls)
In Sim:
| Field | Value |
|---|---|
| Provider Type | SAML |
| Provider ID | adfs |
| Issuer URL | https://adfs.company.com/adfs/services/trust (the ADFS Federation Service identifier) |
| Domain | company.com |
| Entry point URL | https://adfs.company.com/adfs/ls |
| Identity provider certificate | Contents 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:
- User goes to
sim.aiand clicks Sign in with SSO - They enter their work email (e.g.
alice@company.com) - Sim looks up the provider that serves
company.comand redirects them to it - After authenticating, they are returned to Sim
- 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
- 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
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-samlWhen 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.tsThe 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