> ## 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 Azure AD

> For Dub Enterprise users, you can automatically provision and deprovision users from Azure AD to Dub using SCIM Directory Sync.

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

For Dub Enterprise users, you can automatically provision and deprovision users from your Azure Active Directory (AD) to Dub using [SCIM Directory Sync](https://learn.microsoft.com/en-us/azure/active-directory/architecture/sync-scim).

## Step 1: Configure Directory Sync on Dub

In your workspace dashboard on Dub, click on the **Settings** tab in the menu bar at the top. Then, click on the **Security** tab in the sidebar.

![Directory Sync section on the Dub Dashboard](https://assets.dub.co/cms/saml-directory-sync-2.png)

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

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

![SCIM Modal](https://assets.dub.co/cms/scim-entra.png)

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

1. **Tenant URL**
2. **Secret Token**

![SCIM Modal](https://assets.dub.co/cms/scim-entra-confirm.png)

## Step 2: Add Provisioning to SAML Application

Click on the **Provisioning** tab of your existing Dub Okta SAML application that you want to enable SCIM provisioning for.

![Provisioning tab of Okta SAML application](https://assets.dub.co/help/azure-scim-tab.png)

In the Provisioning tab, click on **Get started**.

![Get started with provisioning](https://assets.dub.co/help/azure-scim-get-started.png)

Select **Automatic** from the **Provisioning Mode** dropdown. Under the **Admin Credentials** section, enter the values that you obtained from Step 1:

1. **Tenant URL**
2. **Secret Token**

![Provisioning tab of Azure SAML application](https://assets.dub.co/help/azure-scim-provisioning.png)

Click on **Test Connection** to test the connection to see if the credentials are correct, then click **Save** to save the credentials.

Expand the **Mappings** section and ensure group and user attribute mappings are enabled for your app. The default mapping should work.

![Mappings section of Azure SAML application](https://assets.dub.co/help/azure-scim-mappings.png)

Expand the **Settings** section and make the following changes:

* Select **Sync only assigned users and groups** from the **Scope** dropdown.
* Confirm the **Provisioning Status** is set to **On**.

Click **Save** to save the changes.

![Settings section of Azure SAML application](https://assets.dub.co/help/azure-scim-settings.png)

Congratulations! You've successfully configured SCIM provisioning for your Dub workspace.

## Step 3: Assign Users

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

From your application, click the **Users and groups** from the left navigation menu and click **Add user/group**.

![Adding users in Azure AD](https://assets.dub.co/help/azure-scim-add-users.png)

Click on **None Selected** under **Users**.

From the right side of the screen, select the users you want to assign to the app and click the **Select** button. Thenm click **Assign** to those users to your app.

![Assigning users in Azure AD](https://assets.dub.co/help/azure-scim-assign-user.png)

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

![SAML invite email](https://assets.dub.co/help/saml-invite.png)

> [!WARNING]
>
> Azure AD SCIM provisioning can take [anywhere between 20-40 minutes to
> sync](https://learn.microsoft.com/en-us/azure/databricks/administration-guide/users-groups/scim/aad#provisioning-tips).
> This means that it may take up to 40 minutes for your users to receive the
> invitation email and be able to join your Dub workspace.

They will also be able to sign in to Dub using Azure AD SSO


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