Configure SCIM provisioning for Microsoft Azure Active Directory

To enable provisioning to Azure Databricks using Azure Active Directory (Azure AD) you must create an enterprise application for each Azure Databricks workspace.

Note

Provisioning configuration is entirely separate from the process of setting up authentication and conditional access for Azure Databricks workspaces. Authentication for Azure Databricks is handled automatically by Azure Active Directory, using the OpenID Connect protocol flow. Conditional access, which lets you create rules to require multi-factor authentication or restrict logins to local networks, can be established at the service level. For instructions, see Conditional access.

Requirements

Your Azure AD account must be a Premium edition account, and you must be a global administrator for that account to enable provisioning.

Create an enterprise application and connect to the Azure Databricks SCIM API

In the following examples, replace <databricks-instance> with the adb-<workspace-id>.<random-number>.azuredatabricks.net domain name of your Azure Databricks deployment.

  1. Generate a personal access token in Azure Databricks and copy it. You provide this token to Azure AD in a subsequent step.

    Important

    Generate this token as an Azure Databricks admin who will not be managed by the Azure AD enterprise application that you set up below. An Azure Databricks admin user who is managed by this enterprise application can be deprovisioned using Azure AD, which would cause your SCIM provisioning integration to be disabled.

  2. In your Azure portal, go to Azure Active Directory > Enterprise Applications.

  3. Click + New Application above the application list,. Under Add from the gallery, search for and select Azure Databricks SCIM Provisioning Connector.

  4. Enter a Name for the application and click Add. Use a name that will help administrators find it, like <workspace-name>-provisioning.

  5. Under the Manage menu, click Provisioning.

  6. From the Provisioning Mode drop-down, select Automatic.

  7. Enter the Tenant URL:

    https://<databricks-instance>/api/2.0/preview/scim
    

    Replace with the adb-<workspace-id>.<random-number>.azuredatabricks.net domain name of your Azure Databricks deployment. See Get workspace, cluster, notebook, and job identifiers.

  8. In the Secret Token field, enter the Azure Databricks personal access token that you generated in step 1.

  9. Click Test Connection and wait for the message that confirms that the credentials are authorized to enable provisioning.

  10. Optionally, enter a notification email to receive notifications of critical errors with SCIM provisioning.

  11. Click Save.

Assign users and groups to the application

  1. Go to Manage > Provisioning and, under Settings, set the Scope to Sync only assigned users and groups.

    This option syncs only users and groups assigned to the enterprise application, and is our recommended approach.

    Note

    Azure Active Directory does not support the automatic provisioning of nested groups to Azure Databricks. It is only able to read and provision users that are immediate members of the explicitly assigned group. As a workaround, you should explicitly assign (or otherwise scope in) the groups that contain the users who need to be provisioned. For more information, see this FAQ.

  2. To start the synchronization of users and groups from Azure AD to Azure Databricks, toggle Provisioning Status on.

  3. Click Save.

  4. Test your provisioning setup:

    1. Go to Manage > Users and groups.
    2. Add some users and groups. Click Add user, select the users and groups, and click the Assign button.
    3. Wait a few minutes and check that the users and groups have been added to your Azure Databricks workspace.

Any additional users and groups that you add and assign will automatically be provisioned when Azure AD schedules the next sync.

Important

Do not assign the Azure Databricks admin whose secret token (bearer token) was used to set up this enterprise application.

Provisioning tips

  • Users and groups that existed in Azure Databricks prior to enabling provisioning exhibit the following behavior upon provisioning sync:
    • Are merged if they also exist in this Azure AD enterprise application.
    • Are ignored if they don’t exist in this Azure AD enterprise application.
  • User permissions that are assigned individually and are duplicated through membership in a group remain after the group membership is removed for the user.
  • Users removed from an Azure Databricks workspace directly, using the Azure Databricks Admin console:
    • Lose access to that Azure Databricks workspace but may still have access to other Azure Databricks workspaces.
    • Will not be synced again using Azure AD provisioning, even if they remain in the enterprise application.
  • The initial Azure AD sync is triggered immediately after you turn on provisioning. Subsequent syncs are triggered every 20-40 minutes, depending on the number of users and groups in the application. See Provisioning summary report in the Azure AD documentation.
  • The “admins” group is a reserved group in Azure Databricks and cannot be removed.
  • Groups cannot be renamed in Azure Databricks; do not attempt to rename them in Azure AD.
  • You can use the Azure Databricks Groups API or the Groups UI to get a list of members of any Azure Databricks group.
  • You cannot update Azure Databricks usernames and email addresses.

Troubleshooting

Users and groups do not sync

The issue could be that the Azure Databricks admin user whose personal access token is being used to connect to Azure AD has lost admin status or has an invalid token: log in to the Azure Databricks Admin console as that user and validate that you are still an admin and your access token is still valid.

Another possibility is that you are trying to sync nested groups, which are not supported by Azure AD automatic provisioning. See this FAQ.

After initial sync the users and groups are not syncing

After the initial sync, Azure AD does not sync immediately upon changes to user and group assignments. It schedules a sync with the application after a delay (depending on the number of users and groups). You can go to Manage > Provisioning for the enterprise application and select Clear current state and restart synchronization to initiate an immediate sync.