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

# Okta

> Set up enterprise login (SAML or OIDC) and automatic sync (SCIM) with Okta

Okta works with either SAML or OpenID Connect (OIDC). Use SAML if unsure. You need admin rights in Okta.

## Set up with SAML

### 1. Create an app integration

1. In the Okta Admin Console, open **Applications** → **Applications** → **Create App Integration**.
2. Choose **SAML 2.0**, enter `Arlet` as the App name and continue.

### 2. Configure SAML

Enter the values from "Values to enter in your identity provider" in Arlet's organization settings:

| Okta field | Arlet value |
| - | - |
| Single sign-on URL | Reply URL (ACS URL) |
| Audience URI (SP Entity ID) | Identifier (Entity ID) |
| Name ID format | `EmailAddress` |
| Application username | `Email` |

Add these two **Attribute Statements**:

| Name | Value |
| - | - |
| `http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress` | `user.email` |
| `http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name` | `user.displayName` |

After creating it, copy the **Metadata URL** on the app's **Sign On** tab.

### 3. Assign users and register it in Arlet

1. Under the app's **Assignments**, assign the people or groups who use Arlet.
2. Under "Identity provider connection" in Arlet's organization settings, choose **SAML** and paste the URL into **Metadata URL**.
3. Press **Register**, then **Activate connection**, and confirm you can sign in with your work email.

> [!NOTE]
>
> Single logout with Okta needs Arlet's signing certificate registered in Okta. Contact support if you want to use it.

## Set up with OIDC

1. In **Create App Integration**, choose **OIDC - OpenID Connect** and **Web Application**.
2. Enter the following and save:

| Okta field | Value |
| - | - |
| Grant type | `Authorization Code` |
| Sign-in redirect URIs | Redirect URI (OIDC) |
| Initiate login URI | Sign-on URL (app tile, optional) |
| Login initiated by | `Either Okta or App` (to open from the tile) |

3. Under **Assignments**, assign the people or groups who use Arlet.
4. Under "Identity provider connection" in Arlet's organization settings, choose **OpenID Connect (OIDC)**, enter the following and press **Register**:

| Arlet field | Value |
| - | - |
| Issuer URL | Your Okta org URL (for example `https://example.okta.com`) |
| Client ID | The app's Client ID |
| Client secret | The app's Client secret |

5. Press **Activate connection** and confirm you can sign in with your work email.

Arlet never shows the client secret. If you rotate it in Okta, enter the new one in the organization settings and press **Save**.

## Automatic sync (SCIM)

In addition to sign-in, you can keep Okta users and groups in sync with Arlet. People deactivated or deleted in Okta can no longer use Arlet, and people who have not signed in yet already hold a seat. Groups can be used for [sharing movies](https://docs.arlet.dev/sso/overview.md#sharing-movies-with-groups) and [choosing admins](https://docs.arlet.dev/sso/overview.md#choosing-admins-with-groups). Set this up after the sign-in connection is active.

> [!WARNING]
>
> Arlet links a synced person to their account only when the person's `externalId` matches the identifier Okta sends at sign-in (the SAML Name ID or the OIDC `sub`). In Okta, set both to the Okta user ID. If you used the email address as the Name ID in the SAML steps, change it in step 2 below.

### 1. Issue a token in Arlet

1. In the organization settings, under "Directory sync", press **Enable sync and issue a token**.
2. Copy the **SCIM tenant URL** and the **secret token**. The token is shown only on this screen.

### 2. Use the Okta user ID as the identifier (SAML)

1. In the app you created for sign-in, open **Sign On** → **Settings** and press **Edit**.
2. Set **Application username format** to **Custom**, enter `user.getInternalProperty("id")`, and save.
3. Under **General** → **SAML Settings**, set **Name ID format** to `Persistent`.

With OIDC, `sub` is already the Okta user ID, so this step is not needed.

### 3. Set up provisioning in Okta

1. In the app, open **General** → **App Settings**, press **Edit**, set **Provisioning** to **SCIM**, and save.
2. Open **Provisioning** → **Integration**, press **Edit**, enter the following, then press **Test Connector Configuration** → **Save**.

| Okta field | Value |
| - | - |
| SCIM connector base URL | SCIM tenant URL |
| Unique identifier field for users | `userName` |
| Supported provisioning actions | `Push New Users`, `Push Profile Updates`, `Push Groups` |
| Authentication Mode | `HTTP Header` |
| Authorization (Bearer) | Secret token |

3. Open **Provisioning** → **To App**, press **Edit**, turn on **Create Users**, **Update User Attributes** and **Deactivate Users**, and save.
4. In **To App** → **Attribute Mappings**, set the value of `externalId` (shown as External ID) to `user.getInternalProperty("id")`. If it is missing, add it with **Add Attribute**.
5. Under **Assignments**, assign the people or groups who will use Arlet.
6. Under **Push Groups**, choose the groups you use in Arlet and push them.

### How sync works

* Only the people assigned to the app and the groups pushed under **Push Groups** are synced.
* Members of nested groups are not synced.
* Synced people hold a seat even before they sign in. If there are not enough seats, the person is not synced (Okta shows an error in its tasks).
* Once sync is on, people not synced from Okta cannot join through sign-in. People who joined before sync was turned on keep working.
* Up to two tokens can be active at once for rotation. Put the new token into Okta first, then **Revoke** the old one.
* To stop syncing, stop provisioning in Okta first, then press **Turn off sync** in Arlet. Synced people keep their membership.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.