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

# Configuring SCIM Directory Sync with Okta

> For Dub Enterprise users, you can automatically provision and deprovision users from your Okta directory to Dub using SCIM Directory Sync.

<Tip>
  This feature is only available on [Dub Enterprise](https://dub.co/enterprise).
</Tip>

For Dub Enterprise users, you can automatically provision and deprovision users from your Okta directory to Dub using [SCIM Directory Sync](https://developer.okta.com/docs/concepts/scim/).

## Step 1: Configure Directory Sync on Dub

In your workspace settings, click on **Security** in the **Workspace** group.

<Frame>
  <img src="https://assets.dub.co/cms/scim-directory-sync-2.png" alt="Directory Sync section on the Dub Dashboard" />
</Frame>

Under the **Directory Sync** section, click on **Configure**. This will open up the Directory Sync modal:

1. Select **Okta** as the Directory Provider.
2. Click **Save changes**.

<Frame>
  <img src="https://assets.dub.co/help/okta-scim-modal.png" alt="SCIM Modal" />
</Frame>

This will generate a Directory Sync connection for your Dub workspace, and return 2 values, which will be needed in Step 2:

1. **SCIM 2.0 Base URL**
2. **OAuth Bearer Token**

<Frame>
  <img src="https://assets.dub.co/help/okta-scim-modal-configured.png" alt="SCIM Modal Configured" />
</Frame>

## Step 2: Add Provisioning to SAML Application

Go to the **General** tab of your existing Dub Okta SAML application that you want to enable SCIM provisioning for. Under **App Settings** click **Edit**.

<Frame>
  <img src="https://assets.dub.co/help/okta-scim-general.png" alt="General tab of Okta SAML application" />
</Frame>

Select the "Enable SCIM provisioning" option and click **Save**.

<Frame>
  <img src="https://assets.dub.co/help/okta-scim-enable.png" alt="Enable SCIM provisioning" />
</Frame>

You should now see a **Provisioning** tab. Select it and click **Edit**.

<Frame>
  <img src="https://assets.dub.co/help/okta-scim-provisioning.png" alt="Provisioning tab of Okta SAML application" />
</Frame>

1. Under the **SCIM connector base URL** field, enter the **SCIM 2.0 Base URL** value from Step 1.

2. Under **Unique identifier field for users**, enter `userName`.

```text title="Copy this unique identifier" theme={null}
userName
```

3. Under **Supported provisioning actions**, select the following options:

* Push New Users
* Push Profile Updates
* Push groups

4. Under **Authentication Mode**, select **HTTP Header**.

5. Copy & paste the **OAuth Bearer Token** value from Step 1 into the **Authorization** field.

<Frame>
  <img src="https://assets.dub.co/help/okta-scim-connection.png" alt="Configure SCIM provisioning" />
</Frame>

Click "Test Connector Configuration" to verify that the connection is working, and then click "Save".

## Step 3: Configure Provisioning Actions

Under the **To App** section, click **Edit**.

Check the following options, and click **Save**:

* Create Users
* Update User Attributes
* Deactivate Users

<Frame>
  <img src="https://assets.dub.co/help/okta-scim-actions.png" alt="SCIM Provisioning Actions" />
</Frame>

## Step 4: Assign Users

Once you've configured Directory sync, you can assign users to Dub directly within Okta.

Click on the **Assignments** tab, and click **Assign**. You can choose to assign users individually, or assign them in bulk by group.

<Frame>
  <img src="https://assets.dub.co/help/okta-saml-assign.png" alt="Assigning users in Okta" />
</Frame>

Select the users or groups you want to assign and click **Assign**.

<Frame>
  <img src="https://assets.dub.co/help/okta-saml-choose.png" alt="Assigning users in Okta choose users" />
</Frame>

In the next screen, scroll to the bottom and click **Save and Go Back**.

<Frame>
  <img src="https://assets.dub.co/help/okta-saml-save.png" alt="Saving Okta assignment" />
</Frame>

Your assigned users should now receive an invitation email to join your Dub workspace.

<Frame>
  <img src="https://assets.dub.co/help/saml-invite.png" alt="SAML invite email" />
</Frame>

They will also be able to sign in to Dub using Okta SSO.
