> ## Documentation Index
> Fetch the complete documentation index at: https://docs.e2b.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Set up SSO with Okta

> Connect Okta to your E2B workspace with OpenID Connect so your team signs in to E2B through Okta.

This guide connects Okta to an E2B workspace with OpenID Connect (OIDC). You create an app integration in Okta, add it as a connection in E2B, and then test sign-in. For how SSO works in E2B, see [Single sign-on (SSO)](https://docs.e2b.dev/sso/overview.md).

You need:

* Owner access to an E2B team workspace with the SSO add-on. See [Requirements](https://docs.e2b.dev/sso/overview.md#requirements).
* Admin access to your Okta organization.
* Access to your email domain's DNS settings.

## In Okta

**1. Create an app integration**

In the Okta Admin Console, go to **Applications → Applications** and click **Create App Integration**.

![The Applications page in the Okta Admin Console with the Create App Integration button](https://mintcdn.com/e2b/TRevOe273B2zkCGr/images/sso/okta-01-applications.png?fit=max\&auto=format\&n=TRevOe273B2zkCGr\&q=85\&s=27dcce2448b1515df456b72f7d9ed242)

**2. Choose OIDC and Web Application**

The **Create and deploy private app integrations** dialog opens on the **Okta Integration Wizard** tab, which can't create OIDC integrations. Switch to the **Classic experience** tab, select **OIDC - OpenID Connect** as the sign-in method and **Web Application** as the application type, then click **Next**.

![The Classic experience tab of the Create and deploy private app integrations dialog with OIDC - OpenID Connect and Web Application selected](https://mintcdn.com/e2b/TRevOe273B2zkCGr/images/sso/okta-02-create-integration.png?fit=max\&auto=format\&n=TRevOe273B2zkCGr\&q=85\&s=e650017c9aa06643d85fa5970a677727)

**3. Fill in the general settings**

On the **New Web App Integration** form:

* **Client definition**: choose **Use Okta-generated client ID**. The rest of the form appears after you choose.
* **App integration name**: a name your users will recognize, for example `E2B`.
* **Proof of possession**: leave **DPoP** unchecked.
* **Grant type**: under **Core grants**, **Authorization Code** is already checked. Keep it.
* **Sign-in redirect URIs**: enter the **Callback URL** shown on your workspace's SSO page in E2B. In production, it's `https://auth.e2b.dev/self-service/methods/oidc/callback`.
* **Sign-out redirect URIs**: optionally remove the default entry. E2B doesn't use it.

![The New Web App Integration form with Use Okta-generated client ID selected, the app integration name E2B, Authorization Code checked under Core grants, and the E2B callback URL as the sign-in redirect URI](https://mintcdn.com/e2b/TRevOe273B2zkCGr/images/sso/okta-03-general-settings.png?fit=max\&auto=format\&n=TRevOe273B2zkCGr\&q=85\&s=29c1c19b281a1dcf1bebd49df3f3939b)

**4. Choose who can use the app and save**

Under **Controlled access**, choose who can use the app. To assign people afterwards, as this guide does, choose **Skip group assignment for now**. Click **Save**.

![The Controlled access section with Skip group assignment for now selected and the Save button](https://mintcdn.com/e2b/TRevOe273B2zkCGr/images/sso/okta-04-assignments-save.png?fit=max\&auto=format\&n=TRevOe273B2zkCGr\&q=85\&s=e0f1de1a512069cb71610ec79a5cf23c)

**5. Copy the client ID and client secret**

On the app's **General** tab, copy the **Client ID** under **Client Credentials**, and the secret under **CLIENT SECRETS** with its copy icon. You enter both in E2B later.

![The General tab showing the Client ID under Client Credentials and a masked secret with a copy icon under CLIENT SECRETS](https://mintcdn.com/e2b/TRevOe273B2zkCGr/images/sso/okta-05-client-credentials.png?fit=max\&auto=format\&n=TRevOe273B2zkCGr\&q=85\&s=35f4be37c8cd83946ff7c3cabeb4e0db)

**6. Require PKCE**

Under **Client Credentials**, click **Edit**. For **Proof Key for Code Exchange (PKCE)**, check **Require PKCE as additional verification**, and click **Save**.

![The Client Credentials section in edit mode with Require PKCE as additional verification checked](https://mintcdn.com/e2b/TRevOe273B2zkCGr/images/sso/okta-06-require-pkce.png?fit=max\&auto=format\&n=TRevOe273B2zkCGr\&q=85\&s=570924a9c99151fdb8f183dc462c27ed)

**7. Assign people**

On the app's **Assignments** tab, click **Assign → Assign to People**. In the **Assign E2B to People** dialog, click **Assign** next to each person, then **Save and Go Back** on the profile form that opens. Click **Done** when you're finished. You can also use **Assign to Groups**. Only people assigned to the app can sign in to E2B through Okta.

![The app's Assignments tab with a table listing the people assigned to the app](https://mintcdn.com/e2b/TRevOe273B2zkCGr/images/sso/okta-07-assign-people.png?fit=max\&auto=format\&n=TRevOe273B2zkCGr\&q=85\&s=85a7fb9b0a2daadf0501625128f4a18d)

## In E2B

**1. Open the SSO page**

In the [E2B Console](https://console.e2b.dev/sign-in?signup_source=docs_console), open your workspace and go to **Settings → SSO**.

![The Workspace SSO page in the E2B Console with the Domain, Single sign-on, Just-in-time provisioning, and Require SSO cards](https://mintcdn.com/e2b/TRevOe273B2zkCGr/images/sso/e2b-01-sso-page.png?fit=max\&auto=format\&n=TRevOe273B2zkCGr\&q=85\&s=f659774a9df8307887053e8afadc341a)

**2. Add your domain**

On the **Domain** card, enter the email domain your team uses, for example `your-company.com`, and click **Add domain**. Enter the root domain only, without `https://`, a subdomain, or a path.

![The Domain card with an email domain entered and the Add domain button](https://mintcdn.com/e2b/TRevOe273B2zkCGr/images/sso/e2b-02-add-domain.png?fit=max\&auto=format\&n=TRevOe273B2zkCGr\&q=85\&s=04a37a1f1123106e60db9ed94e67109d)

**3. Publish the TXT record**

The domain shows as **PENDING** with a DNS record. At your DNS provider, add a `TXT` record with the name `_e2b-challenge.<your-domain>` and the value shown on the card, which starts with `e2b-domain-verification=`.

![The Domain card showing a PENDING domain with the TXT record type, name, and value to publish](https://mintcdn.com/e2b/TRevOe273B2zkCGr/images/sso/e2b-03-domain-txt-record.png?fit=max\&auto=format\&n=TRevOe273B2zkCGr\&q=85\&s=5abfdef564111a6e849a3a70154ab648)

**4. Verify the domain**

Click **Check verification**. When E2B finds the record, the domain shows as **VERIFIED**. DNS changes can take a few minutes, so if the check doesn't pass right away, wait and try again.

![The Domain card showing the domain as VERIFIED](https://mintcdn.com/e2b/TRevOe273B2zkCGr/images/sso/e2b-04-domain-verified.png?fit=max\&auto=format\&n=TRevOe273B2zkCGr\&q=85\&s=6c749cd633a2439d5f442fb9464f172e)

**5. Add the Okta connection**

On the **Single sign-on** card, fill in:

* **Connection name**: shown on the sign-in button, for example `Okta`, which gives **Sign in with Okta**.
* **Issuer URL**: your Okta organization URL, for example `https://your-company.okta.com`, without `/oauth2/default`.
* **Client ID** and **Client secret**: the values you copied from Okta.

Click **Save connection**. Saving turns off email invitations for the workspace and revokes pending ones.

![The Single sign-on card filled in with a connection name, Okta issuer URL, client ID, and a masked client secret](https://mintcdn.com/e2b/TRevOe273B2zkCGr/images/sso/e2b-05-connection-form.png?fit=max\&auto=format\&n=TRevOe273B2zkCGr\&q=85\&s=f73962d89634920d9c5020ab5d88b634)

**6. Check the connection**

The card shows **CONFIGURED** with the connection details. The connection isn't tested yet, and SSO isn't enforced.

![The Single sign-on card showing a CONFIGURED connection with its name, Issuer URL, Client ID, Callback URL, and Edit and Remove buttons](https://mintcdn.com/e2b/TRevOe273B2zkCGr/images/sso/e2b-06-connection-configured.png?fit=max\&auto=format\&n=TRevOe273B2zkCGr\&q=85\&s=de01e1194faec36519880ca0c9a0b930)

**7. Turn on just-in-time provisioning**

Turn on **Just-in-time provisioning** so people on your verified domain join the workspace as Viewers the first time they sign in with Okta. Leave **Require SSO** off for now: you can turn it on only after you've signed in with SSO yourself. See [Require SSO](https://docs.e2b.dev/sso/overview.md#require-sso).

![The Just-in-time provisioning and Require SSO cards with their toggles](https://mintcdn.com/e2b/TRevOe273B2zkCGr/images/sso/e2b-07-jit-require-sso.png?fit=max\&auto=format\&n=TRevOe273B2zkCGr\&q=85\&s=986287d916291aa8581a346667a75101)

## Test sign-in

### A new member

Use an Okta user who is assigned to the app and doesn't have an E2B account yet.

**1. Enter the work email**

Open the E2B sign-in page, enter the work email, and click **Continue**.

![The E2B sign-in page with a work email entered and the Continue button](https://mintcdn.com/e2b/TRevOe273B2zkCGr/images/sso/signin-01-enter-email.png?fit=max\&auto=format\&n=TRevOe273B2zkCGr\&q=85\&s=1e08ff3c2d0bc48532bd79312ae4c48d)

**2. Sign in with Okta**

The page shows a single **Sign in with \<Connection name>** button, here **Sign in with Okta**. Click it.

![The E2B sign-in page showing a single Sign in with Okta button](https://mintcdn.com/e2b/TRevOe273B2zkCGr/images/sso/signin-02-sso-button.png?fit=max\&auto=format\&n=TRevOe273B2zkCGr\&q=85\&s=c8d82c46ea3d601a8217e89b8ad9a9b6)

**3. Authenticate in Okta**

Sign in on the Okta page. Depending on your Okta policies, Okta may ask the person to set up multi-factor authentication. You control this in Okta.

![The Okta sign-in page](https://mintcdn.com/e2b/TRevOe273B2zkCGr/images/sso/signin-03-okta.png?fit=max\&auto=format\&n=TRevOe273B2zkCGr\&q=85\&s=3c4f4d2157fb61f50f56f3900a73e8a0)

**4. Confirm the email address**

The first time someone signs in with SSO, E2B emails them a one-time code. They enter it on the **Verify your email** page and click **Continue**. Later sign-ins skip this step. See [Email confirmation](https://docs.e2b.dev/sso/overview.md#email-confirmation).

**5. Land in E2B**

The person returns to E2B, signed in. With just-in-time provisioning on, they are now a Viewer in the workspace. A workspace owner can change their role on the members page.

![The E2B Console after signing in with Okta](https://mintcdn.com/e2b/TRevOe273B2zkCGr/images/sso/signin-04-signed-in.png?fit=max\&auto=format\&n=TRevOe273B2zkCGr\&q=85\&s=7e3332d73bd13f0eb49aca216e45afef)

### An existing E2B account

Use an Okta user whose email already has an E2B account, for example one created with a password or with Google.

Sign in as above: enter the work email, click **Continue**, click **Sign in with Okta**, and sign in at Okta. E2B then shows **Link your account**. The person signs in once with the method they used before, for example by choosing **Password** and clicking **Sign in with password**. If they forgot their password, they can use account recovery. From then on, Okta signs them in directly.

![The Link your account screen saying the email already has an E2B account and asking the person to sign in to it once](https://mintcdn.com/e2b/TRevOe273B2zkCGr/images/sso/signin-05-link-account.png?fit=max\&auto=format\&n=TRevOe273B2zkCGr\&q=85\&s=d9df972cfe3a1db0ec59f03b74fe7c5e)

> [!WARNING]
>
> The email in Okta must match the email on the existing E2B account. If it doesn't, E2B creates a separate account. See [Existing E2B accounts](https://docs.e2b.dev/sso/overview.md#existing-e2b-accounts).

## Require SSO

After you've signed in with Okta yourself, you can turn on **Require SSO** on the SSO page. Members who don't sign in with SSO are then suspended until they do. See [Require SSO](https://docs.e2b.dev/sso/overview.md#require-sso).
