|
| 1 | +--- |
| 2 | +title: Single Sign-On (SSO) |
| 3 | +description: Configure SAML 2.0 or OIDC-based single sign-on for your organization |
| 4 | +--- |
| 5 | + |
| 6 | +import { Callout } from 'fumadocs-ui/components/callout' |
| 7 | +import { Tab, Tabs } from 'fumadocs-ui/components/tabs' |
| 8 | +import { FAQ } from '@/components/ui/faq' |
| 9 | + |
| 10 | +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. |
| 11 | + |
| 12 | +--- |
| 13 | + |
| 14 | +## Requirements |
| 15 | + |
| 16 | +**Sim Cloud:** Enterprise plan. You must be a workspace owner or admin. |
| 17 | + |
| 18 | +**Self-hosted:** Set `SSO_ENABLED=true` and `NEXT_PUBLIC_SSO_ENABLED=true` in your environment. No plan requirement. |
| 19 | + |
| 20 | +--- |
| 21 | + |
| 22 | +## Setup |
| 23 | + |
| 24 | +### 1. Open SSO settings |
| 25 | + |
| 26 | +Go to **Settings → Enterprise → Single Sign-On** in your workspace. |
| 27 | + |
| 28 | +### 2. Choose a protocol |
| 29 | + |
| 30 | +| Protocol | Use when | |
| 31 | +|----------|----------| |
| 32 | +| **OIDC** | Your IdP supports OpenID Connect — Okta, Azure AD (Entra ID), Auth0, Google Workspace | |
| 33 | +| **SAML 2.0** | Your IdP is SAML-only — ADFS, Shibboleth, or older enterprise IdPs | |
| 34 | + |
| 35 | +### 3. Fill in the form |
| 36 | + |
| 37 | +**Fields required for both protocols:** |
| 38 | + |
| 39 | +| Field | What to enter | |
| 40 | +|-------|--------------| |
| 41 | +| **Provider ID** | A short slug identifying this connection, e.g. `okta` or `azure-ad`. Letters, numbers, and dashes only. | |
| 42 | +| **Issuer URL** | The identity provider's issuer URL. Must be HTTPS. | |
| 43 | +| **Domain** | Your organization's email domain, e.g. `company.com`. Users with this domain will be routed through SSO at sign-in. | |
| 44 | + |
| 45 | +**OIDC additional fields:** |
| 46 | + |
| 47 | +| Field | What to enter | |
| 48 | +|-------|--------------| |
| 49 | +| **Client ID** | The application client ID from your IdP. | |
| 50 | +| **Client Secret** | The client secret from your IdP. | |
| 51 | +| **Scopes** | Comma-separated OIDC scopes. Default: `openid,profile,email`. | |
| 52 | + |
| 53 | +<Callout type="info"> |
| 54 | + 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. |
| 55 | +</Callout> |
| 56 | + |
| 57 | +**SAML additional fields:** |
| 58 | + |
| 59 | +| Field | What to enter | |
| 60 | +|-------|--------------| |
| 61 | +| **Entry Point URL** | The IdP's SSO service URL where Sim sends authentication requests. | |
| 62 | +| **Identity Provider Certificate** | The PEM-format X.509 certificate from your IdP for verifying assertions. | |
| 63 | + |
| 64 | +### 4. Copy the Callback URL |
| 65 | + |
| 66 | +The **Callback URL** shown in the form is the endpoint your identity provider must redirect users back to after authentication. Copy it and register it in your IdP before saving. |
| 67 | + |
| 68 | +``` |
| 69 | +https://simstudio.ai/api/auth/sso/callback/{provider-id} |
| 70 | +``` |
| 71 | + |
| 72 | +For self-hosted: |
| 73 | +``` |
| 74 | +https://your-instance.com/api/auth/sso/callback/{provider-id} |
| 75 | +``` |
| 76 | + |
| 77 | +### 5. Save and test |
| 78 | + |
| 79 | +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. |
| 80 | + |
| 81 | +--- |
| 82 | + |
| 83 | +## Provider Guides |
| 84 | + |
| 85 | +<Tabs items={['Okta', 'Azure AD', 'Google Workspace', 'ADFS']}> |
| 86 | + |
| 87 | +<Tab value="Okta"> |
| 88 | + |
| 89 | +### Okta (OIDC) |
| 90 | + |
| 91 | +**In Okta:** |
| 92 | + |
| 93 | +1. Go to **Applications → Create App Integration** |
| 94 | +2. Select **OIDC - OpenID Connect**, then **Web Application** |
| 95 | +3. Set the **Sign-in redirect URI** to your Sim callback URL: |
| 96 | + ``` |
| 97 | + https://simstudio.ai/api/auth/sso/callback/okta |
| 98 | + ``` |
| 99 | +4. Under **Assignments**, grant access to the relevant users or groups |
| 100 | +5. Copy the **Client ID** and **Client Secret** from the app's General tab |
| 101 | +6. Copy the **Okta domain** from your account (e.g. `dev-1234567.okta.com`) |
| 102 | + |
| 103 | +**In Sim:** |
| 104 | + |
| 105 | +| Field | Value | |
| 106 | +|-------|-------| |
| 107 | +| Provider Type | OIDC | |
| 108 | +| Provider ID | `okta` | |
| 109 | +| Issuer URL | `https://dev-1234567.okta.com/oauth2/default` | |
| 110 | +| Domain | `company.com` | |
| 111 | +| Client ID | From Okta app | |
| 112 | +| Client Secret | From Okta app | |
| 113 | + |
| 114 | +</Tab> |
| 115 | + |
| 116 | +<Tab value="Azure AD"> |
| 117 | + |
| 118 | +### Azure AD / Entra ID (OIDC) |
| 119 | + |
| 120 | +**In Azure:** |
| 121 | + |
| 122 | +1. Go to **Azure Active Directory → App registrations → New registration** |
| 123 | +2. Set the **Redirect URI** (Web) to your Sim callback URL: |
| 124 | + ``` |
| 125 | + https://simstudio.ai/api/auth/sso/callback/azure-ad |
| 126 | + ``` |
| 127 | +3. After registration, go to **Certificates & secrets → New client secret** and copy the value |
| 128 | +4. Go to **Overview** and copy the **Application (client) ID** and **Directory (tenant) ID** |
| 129 | + |
| 130 | +**In Sim:** |
| 131 | + |
| 132 | +| Field | Value | |
| 133 | +|-------|-------| |
| 134 | +| Provider Type | OIDC | |
| 135 | +| Provider ID | `azure-ad` | |
| 136 | +| Issuer URL | `https://login.microsoftonline.com/{tenant-id}/v2.0` | |
| 137 | +| Domain | `company.com` | |
| 138 | +| Client ID | Application (client) ID | |
| 139 | +| Client Secret | Secret value | |
| 140 | + |
| 141 | +<Callout type="info"> |
| 142 | + Replace `{tenant-id}` with your Directory (tenant) ID from Azure AD. Sim will auto-discover the token and JWKS endpoints from the issuer. |
| 143 | +</Callout> |
| 144 | + |
| 145 | +</Tab> |
| 146 | + |
| 147 | +<Tab value="Google Workspace"> |
| 148 | + |
| 149 | +### Google Workspace (OIDC) |
| 150 | + |
| 151 | +**In Google Cloud Console:** |
| 152 | + |
| 153 | +1. Go to **APIs & Services → Credentials → Create Credentials → OAuth 2.0 Client ID** |
| 154 | +2. Set the application type to **Web application** |
| 155 | +3. Add your Sim callback URL to **Authorized redirect URIs**: |
| 156 | + ``` |
| 157 | + https://simstudio.ai/api/auth/sso/callback/google-workspace |
| 158 | + ``` |
| 159 | +4. Copy the **Client ID** and **Client Secret** |
| 160 | + |
| 161 | +**In Sim:** |
| 162 | + |
| 163 | +| Field | Value | |
| 164 | +|-------|-------| |
| 165 | +| Provider Type | OIDC | |
| 166 | +| Provider ID | `google-workspace` | |
| 167 | +| Issuer URL | `https://accounts.google.com` | |
| 168 | +| Domain | `company.com` | |
| 169 | +| Client ID | From Google Cloud Console | |
| 170 | +| Client Secret | From Google Cloud Console | |
| 171 | + |
| 172 | +<Callout type="info"> |
| 173 | + To restrict sign-in to your Google Workspace domain only, set **Authorized domains** in the OAuth consent screen to your organization's domain. |
| 174 | +</Callout> |
| 175 | + |
| 176 | +</Tab> |
| 177 | + |
| 178 | +<Tab value="ADFS"> |
| 179 | + |
| 180 | +### ADFS (SAML 2.0) |
| 181 | + |
| 182 | +**In ADFS:** |
| 183 | + |
| 184 | +1. Open **AD FS Management → Relying Party Trusts → Add Relying Party Trust** |
| 185 | +2. Choose **Claims aware**, then **Enter data about the relying party manually** |
| 186 | +3. Set the **Relying party identifier** (Entity ID) to your Sim instance URL, e.g.: |
| 187 | + ``` |
| 188 | + https://simstudio.ai |
| 189 | + ``` |
| 190 | + For self-hosted: use your instance's base URL (e.g. `https://sim.company.com`). This value goes in the **Issuer URL** field in Sim. |
| 191 | +4. Add an endpoint: **SAML Assertion Consumer Service** with the URL: |
| 192 | + ``` |
| 193 | + https://simstudio.ai/api/auth/sso/callback/adfs |
| 194 | + ``` |
| 195 | + For self-hosted: `https://sim.company.com/api/auth/sso/callback/adfs` |
| 196 | +5. Export the **Token-signing certificate** in PEM format from **Certificates** |
| 197 | +6. Note the **ADFS Federation Service endpoint URL** (e.g. `https://adfs.company.com/adfs/ls`) |
| 198 | + |
| 199 | +**In Sim:** |
| 200 | + |
| 201 | +| Field | Value | |
| 202 | +|-------|-------| |
| 203 | +| Provider Type | SAML | |
| 204 | +| Provider ID | `adfs` | |
| 205 | +| Issuer URL | `https://simstudio.ai` | |
| 206 | +| Domain | `company.com` | |
| 207 | +| Entry Point URL | `https://adfs.company.com/adfs/ls` | |
| 208 | +| Certificate | PEM certificate from ADFS | |
| 209 | + |
| 210 | +</Tab> |
| 211 | + |
| 212 | +</Tabs> |
| 213 | + |
| 214 | +--- |
| 215 | + |
| 216 | +## How sign-in works after setup |
| 217 | + |
| 218 | +Once SSO is configured, users with your domain (`company.com`) can sign in through your identity provider: |
| 219 | + |
| 220 | +1. User goes to `simstudio.ai` and clicks **Sign in with SSO** |
| 221 | +2. They enter their work email (e.g. `alice@company.com`) |
| 222 | +3. Sim redirects them to your identity provider |
| 223 | +4. After authenticating, they are returned to Sim and added to your organization automatically |
| 224 | +5. They land in the workspace |
| 225 | + |
| 226 | +Users who sign in via SSO for the first time are automatically provisioned and added to your organization — no manual invite required. |
| 227 | + |
| 228 | +<Callout type="info"> |
| 229 | + Password-based login remains available. Forcing all organization members to use SSO exclusively is not yet supported. |
| 230 | +</Callout> |
| 231 | + |
| 232 | +<Callout type="info"> |
| 233 | + **Self-hosted:** Automatic organization provisioning requires `ORGANIZATIONS_ENABLED=true` in addition to `SSO_ENABLED=true`. Without it, SSO authentication still works — users get a valid session — but they are not automatically added to an organization. |
| 234 | +</Callout> |
| 235 | + |
| 236 | +--- |
| 237 | + |
| 238 | +## Self-hosted setup |
| 239 | + |
| 240 | +Self-hosted deployments use environment variables instead of the billing/plan check. |
| 241 | + |
| 242 | +### Environment variables |
| 243 | + |
| 244 | +```bash |
| 245 | +# Required |
| 246 | +SSO_ENABLED=true |
| 247 | +NEXT_PUBLIC_SSO_ENABLED=true |
| 248 | + |
| 249 | +# Required if you want users auto-added to your organization on first SSO sign-in |
| 250 | +ORGANIZATIONS_ENABLED=true |
| 251 | +NEXT_PUBLIC_ORGANIZATIONS_ENABLED=true |
| 252 | +``` |
| 253 | + |
| 254 | +You can register providers through the **Settings UI** (same as cloud) or by running the registration script directly against your database. |
| 255 | + |
| 256 | +### Script-based registration |
| 257 | + |
| 258 | +Use this when you need to register an SSO provider without going through the UI — for example, during initial deployment or CI/CD automation. |
| 259 | + |
| 260 | +```bash |
| 261 | +# OIDC example (Okta) |
| 262 | +SSO_ENABLED=true \ |
| 263 | +SSO_PROVIDER_TYPE=oidc \ |
| 264 | +SSO_PROVIDER_ID=okta \ |
| 265 | +SSO_ISSUER=https://dev-1234567.okta.com/oauth2/default \ |
| 266 | +SSO_DOMAIN=company.com \ |
| 267 | +SSO_USER_EMAIL=admin@company.com \ |
| 268 | +SSO_OIDC_CLIENT_ID=your-client-id \ |
| 269 | +SSO_OIDC_CLIENT_SECRET=your-client-secret \ |
| 270 | +bun run packages/db/scripts/register-sso-provider.ts |
| 271 | +``` |
| 272 | + |
| 273 | +```bash |
| 274 | +# SAML example (ADFS) |
| 275 | +SSO_ENABLED=true \ |
| 276 | +SSO_PROVIDER_TYPE=saml \ |
| 277 | +SSO_PROVIDER_ID=adfs \ |
| 278 | +SSO_ISSUER=https://your-instance.com \ |
| 279 | +SSO_DOMAIN=company.com \ |
| 280 | +SSO_USER_EMAIL=admin@company.com \ |
| 281 | +SSO_SAML_ENTRY_POINT=https://adfs.company.com/adfs/ls \ |
| 282 | +SSO_SAML_CERT="-----BEGIN CERTIFICATE----- |
| 283 | +... |
| 284 | +-----END CERTIFICATE-----" \ |
| 285 | +bun run packages/db/scripts/register-sso-provider.ts |
| 286 | +``` |
| 287 | + |
| 288 | +The script outputs the callback URL to configure in your IdP once it completes. |
| 289 | + |
| 290 | +To remove a provider: |
| 291 | + |
| 292 | +```bash |
| 293 | +SSO_USER_EMAIL=admin@company.com \ |
| 294 | +bun run packages/db/scripts/deregister-sso-provider.ts |
| 295 | +``` |
| 296 | + |
| 297 | +<FAQ items={[ |
| 298 | + { |
| 299 | + question: "Which SSO providers are supported?", |
| 300 | + answer: "Any identity provider that supports OIDC or SAML 2.0. This includes Okta, Azure AD (Entra ID), Google Workspace, Auth0, OneLogin, JumpCloud, Ping Identity, ADFS, Shibboleth, and more." |
| 301 | + }, |
| 302 | + { |
| 303 | + question: "What is the Domain field used for?", |
| 304 | + answer: "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 a registered SSO provider and redirects them there." |
| 305 | + }, |
| 306 | + { |
| 307 | + question: "Do I need to provide OIDC endpoints manually?", |
| 308 | + answer: "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." |
| 309 | + }, |
| 310 | + { |
| 311 | + question: "What happens when a user signs in with SSO for the first time?", |
| 312 | + answer: "Sim creates an account for them automatically and adds them to your organization. No manual invite is needed. They are assigned the member role by default." |
| 313 | + }, |
| 314 | + { |
| 315 | + question: "Can I still use email/password login after enabling SSO?", |
| 316 | + answer: "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." |
| 317 | + }, |
| 318 | + { |
| 319 | + question: "Who can configure SSO on Sim Cloud?", |
| 320 | + answer: "Organization owners and admins can configure SSO. You must be on the Enterprise plan." |
| 321 | + }, |
| 322 | + { |
| 323 | + question: "What is the Callback URL?", |
| 324 | + answer: "The Callback URL (also called Redirect URI or ACS URL) is the endpoint in Sim that receives the authentication response from your identity provider. It follows the format: https://simstudio.ai/api/auth/sso/callback/{provider-id}. You must register this URL in your identity provider before SSO will work." |
| 325 | + }, |
| 326 | + { |
| 327 | + question: "How do I update or replace an existing SSO configuration?", |
| 328 | + answer: "Open Settings → Enterprise → Single Sign-On and click Edit. Update the fields and save. The existing provider configuration is replaced." |
| 329 | + } |
| 330 | +]} /> |
0 commit comments