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

# Okta SSO

> Step-by-step guide to configure Okta Single Sign-On for CrewAI Factory

## Overview

This guide walks you through configuring Okta as your Single Sign-On (SSO) provider for CrewAI Factory installations.

<Note>
  **Installing for the first time?** The [Deployment Guides](/deployment-guides/overview) provide complete end-to-end walkthroughs with infrastructure setup, full `values.yaml` examples, and post-install steps. Use the closest guide as a base and replace the auth section with this page's Helm values.
</Note>

## Initial Setup

Open your Okta admin panel. Use the left sidebar to navigate to **"Applications"** > **"Applications"**. Then click **"Create App Integration"**.

<img src="https://mintcdn.com/crewai-enterprise/FDCCTm3UPXc6a0tn/images/okta-sso/okta-create-app-integration.png?fit=max&auto=format&n=FDCCTm3UPXc6a0tn&q=85&s=68e47f34b53d17f11bfaf2af5407dfae" alt="Okta Create App Integration" width="1913" height="814" data-path="images/okta-sso/okta-create-app-integration.png" />

Choose **"OIDC - OpenID Connect"** and **"Web Application"**. Click Next.

<img src="https://mintcdn.com/crewai-enterprise/FDCCTm3UPXc6a0tn/images/okta-sso/okta-app-integration-type.png?fit=max&auto=format&n=FDCCTm3UPXc6a0tn&q=85&s=fc1485347a6c1b7575d708cd22332a86" alt="Okta App Integration Type" width="2125" height="1204" data-path="images/okta-sso/okta-app-integration-type.png" />

Give a name for your app (suggested: **CrewAI SSO**). In the sign-in redirect URI, add the URI of your CrewAI Factory installation and add `/auth/okta/callback` at the end (e.g. `https://myfactoryurl.crewai.com/auth/okta/callback`)

For the sign-out URI, just add the plain URI of your CrewAI Factory installation (e.g. `https://myfactoryurl.crewai.com/auth/okta/callback`)

<img src="https://mintcdn.com/crewai-enterprise/FDCCTm3UPXc6a0tn/images/okta-sso/okta-app-configuration.png?fit=max&auto=format&n=FDCCTm3UPXc6a0tn&q=85&s=55f3767d0c23c66db33fc870bbeacfc9" alt="Okta App Configuration" width="959" height="1280" data-path="images/okta-sso/okta-app-configuration.png" />

Under **"Assignments"**, choose the preferred way to control access to the app - everyone or limit access to selected groups. Click **"Save"**.

<img src="https://mintcdn.com/crewai-enterprise/FDCCTm3UPXc6a0tn/images/okta-sso/okta-assignments.png?fit=max&auto=format&n=FDCCTm3UPXc6a0tn&q=85&s=e2ef9fe7b8f32aa21b5c041dbc58e7a4" alt="Okta Assignments" width="1041" height="417" data-path="images/okta-sso/okta-assignments.png" />

## Collecting Credentials

Now with the app created, we can collect the necessary credentials for the CrewAI Factory application environment variables.

* Under **"Client Credentials"**, copy the Client ID. This value should be assigned to the `OKTA_CLIENT_ID`.
* Under **"Client Secrets"** copy the existing secret or generate a new one. The secret should be assigned to the `OKTA_CLIENT_SECRET` environment variable.
* On the top right corner under your Okta username, you can obtain your unique okta URL. Copy it and assign to the `OKTA_SITE` environment variable.

<img src="https://mintcdn.com/crewai-enterprise/FDCCTm3UPXc6a0tn/images/okta-sso/okta-client-credentials.png?fit=max&auto=format&n=FDCCTm3UPXc6a0tn&q=85&s=c8fbb75d5d0f3f540eb9fa3ea6b00cad" alt="Okta Client Credentials" width="1086" height="904" data-path="images/okta-sso/okta-client-credentials.png" />

## Managing Access

Now, under **"Assignments"** tab, we can manage who has access to this application (if you haven't enabled "Everyone" when creating the app). If you enabled access only to specific people or groups and didn't assign them at app creation time, it is a good moment to do so. Just click **"Assign"**, choose if **"People"** or **"Groups"** and follow the prompts on screen.

<img src="https://mintcdn.com/crewai-enterprise/FDCCTm3UPXc6a0tn/images/okta-sso/okta-assignments-management.png?fit=max&auto=format&n=FDCCTm3UPXc6a0tn&q=85&s=25f5786584a4332dd4600318c1c52914" alt="Okta Assignments Management" width="1091" height="896" data-path="images/okta-sso/okta-assignments-management.png" />

## Configure Authorization Server

And lastly, we have to configure our authorization server with a policy that allows using our newly created app to login into CrewAI Factory. On the left sidebar, find **"Security"**, and then **"API"**.

<img src="https://mintcdn.com/crewai-enterprise/FDCCTm3UPXc6a0tn/images/okta-sso/okta-security-api.png?fit=max&auto=format&n=FDCCTm3UPXc6a0tn&q=85&s=89a7d26698113e15ab33f911d5264540" alt="Okta Security API" width="1271" height="956" data-path="images/okta-sso/okta-security-api.png" />

You should have at least one authorization server, named **"default"**. We will use this server for demonstrating the configuration, but you can use another server or create a new one if needed. Just remember that the name of the authorization server that you want to use should be the same as the value of the `OKTA_AUTHORIZATION_SERVER` environment variable. Use the same value value as Audience of the `OKTA_AUDIENCE` environment variable

<Warning>
  **NOTE:** If you create a custom authorization server instead of using the `default`, or even if you edit the default one, make sure to update the environment variables `OKTA_AUTHORIZATION_SERVER` and `OKTA_AUDIENCE` with the matching values of "Name" and "Audience" displayed in the authorization servers table listing.

  Failure to do so will likely result in `"401 Client Error: Unauthorized for url"` or `"Invalid token: Signature verification failed"` errors when trying to authenticate with the CrewAI CLI tool.
</Warning>

Click on **"Edit"** icon in the server that you will use as your authorization server.

<img src="https://mintcdn.com/crewai-enterprise/FDCCTm3UPXc6a0tn/images/okta-sso/okta-authorization-server-edit.png?fit=max&auto=format&n=FDCCTm3UPXc6a0tn&q=85&s=75baf8edd931f2ab8f9991d20a788566" alt="Okta Authorization Server Edit" width="1122" height="864" data-path="images/okta-sso/okta-authorization-server-edit.png" />

Under the **"Access Policies"** tab, click **"Add Policy"**, or, if you have existing Policies, **"Add New Access Policy"**.

<img src="https://mintcdn.com/crewai-enterprise/FDCCTm3UPXc6a0tn/images/okta-sso/okta-access-policies.png?fit=max&auto=format&n=FDCCTm3UPXc6a0tn&q=85&s=4e74c2ffb98d3b2d6bf51b655e4143d4" alt="Okta Access Policies" width="1055" height="1082" data-path="images/okta-sso/okta-access-policies.png" />

After adding the policy, click on **"Add rule"** to add a new rule to the Policy.

<img src="https://mintcdn.com/crewai-enterprise/FDCCTm3UPXc6a0tn/images/okta-sso/okta-add-rule.png?fit=max&auto=format&n=FDCCTm3UPXc6a0tn&q=85&s=19080e8d07b55bb9eff32fb350c6e666" alt="Okta Add Rule" width="1068" height="835" data-path="images/okta-sso/okta-add-rule.png" />

Leave everything as default, except under **"Scopes requested"** - there, you should click **"The following scopes:"**, and then under the input area, click **"OIDC default scopes"**. Click **"Create rule"** to save.

<img src="https://mintcdn.com/crewai-enterprise/FDCCTm3UPXc6a0tn/images/okta-sso/okta-scope-configuration.png?fit=max&auto=format&n=FDCCTm3UPXc6a0tn&q=85&s=2d58a5e6935f0993019189d1ddbc00d7" alt="Okta Scope Configuration" width="1002" height="1130" data-path="images/okta-sso/okta-scope-configuration.png" />

## Helm Values Configuration

<Warning>
  OKTA\_SITE, OKTA\_CLIENT\_ID, OKTA\_AUTHORIZATION\_SERVER, and OKTA\_AUDIENCE are non-sensitive identifiers that must be placed under `envVars:`. OKTA\_CLIENT\_SECRET is a credential and must be placed under `secrets:`. The chart template does not render Okta values from `secrets:` — any Okta value under `secrets:` is silently absent from pod environment variables.
</Warning>

```yaml theme={null}
envVars:
  AUTH_PROVIDER: "okta"
  OKTA_SITE: "https://trial-6682116.okta.com"            # From Okta admin URL
  OKTA_CLIENT_ID: "0oaqnwji7pGW7VT6T697"                 # From Client Credentials
  OKTA_AUTHORIZATION_SERVER: "default"                    # Authorization server name
  OKTA_AUDIENCE: "api://default"                          # Audience from auth server

secrets:
  OKTA_CLIENT_SECRET: "m4loX_3W3lC7JfCct8LZVb4..."
```

**Environment variable reference (equivalent values):**

```bash theme={null}
AUTH_PROVIDER=okta
OKTA_CLIENT_ID=0oaqnwji7pGW7VT6T697
OKTA_AUDIENCE=api://default
OKTA_CLIENT_SECRET=m4loX_3W3lC7JfCct8LZVb4Lxwyk8XtDSI6am9OybOClgjkTa2ncsZfXyT4YU0uT
OKTA_SITE=https://trial-6682116.okta.com
OKTA_AUTHORIZATION_SERVER=default
```

<Note>
  `oauth.enabled` is NOT required for Okta SSO. Enabling it unnecessarily adds a database pre-creation requirement and deploys an additional microservice. `oauth.enabled` controls the Built-In Integrations service (Gmail, HubSpot, etc.) — it is separate from SSO authentication.
</Note>

## Combining With Other Features

* **Wharf (trace collection)**: No additional values needed — Wharf is enabled by default. Ensure the `wharf` database is pre-created. See [Wharf reference](/reference/chart-values/wharf).
* **Studio V2**: Configured entirely post-install via the web UI and `kubectl exec` commands. See [Enable Studio V2](/features/studio-v2).
* **Built-in Integrations**: Requires `oauth.enabled: true` and separate OAuth credentials. See [Built-In Integrations](/features/built-in-integrations-overview).
* **ArgoCD / GitOps**: Auto-generated secrets must be set explicitly. See the [ArgoCD guide](/configuration/argocd).

## Configure the CLI to use Okta as your OAuth2 provider

First of all, let's make sure you have a dedicated application to perform the Device Authorization Grant Flow.

To do that, open your Admin Okta console and click in **Create App Integration**

Select **OIDC - OpenID Connect** as the **Sign-in method**, and then **Native Application** as the **Application type**.

<Note>
  Device Authorization is only supported for use with a native application.
</Note>

<img src="https://mintcdn.com/crewai-enterprise/FDCCTm3UPXc6a0tn/images/okta-sso/okta-native-application.png?fit=max&auto=format&n=FDCCTm3UPXc6a0tn&q=85&s=3cab3336d8bd46292a7f6c7e42fdaa06" alt="Okta Native Application" width="1972" height="1712" data-path="images/okta-sso/okta-native-application.png" />

Now, click **Next** and specify the **App integration name**. You must Select **Device Authorization** and **Refresh Token** as the grant types and then select **Allow everyone in your organization to access** in the **Assignments** section. After all is selected, click **Save**.

<img src="https://mintcdn.com/crewai-enterprise/FDCCTm3UPXc6a0tn/images/okta-sso/okta-device-authorization-configuration.png?fit=max&auto=format&n=FDCCTm3UPXc6a0tn&q=85&s=b9c575fc4b1d53132cb9fc53a14e3211" alt="Okta Device Authorization Configuration" width="1786" height="1838" data-path="images/okta-sso/okta-device-authorization-configuration.png" />

Now, set the `OKTA_DEVICE_AUTHORIZATION_CLIENT_ID` environment variable to match the client\_id generated for your app.

```bash theme={null}
OKTA_DEVICE_AUTHORIZATION_CLIENT_ID=0oaqnwji7pGW7VT6231
```

Now you are ready to configure your enterprise CLI login!

Make sure your `crewai` CLI is version 0.159.0 or higher. To configure the Okta provider just run the following command:

```bash theme={null}
crewai enterprise configure https://your-factory-url.app
```

All set! You're now ready to authenticate using Okta:

```bash theme={null}
crewai login
```
