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

# Entra ID

<Card title="Tutorial: Managing user account provisioning for enterprise apps in Entra" icon="graduation-cap" href="https://learn.microsoft.com/en-us/entra/identity/app-provisioning/configure-automatic-user-provisioning-portal" horizontal />

## Create enterprise application

Sign in to the Entra ID Admin Center Dashboard. Select **Enterprise applications** and click **New application**.

<img src="https://mintcdn.com/dbx/VmH49kiwLiErec4u/content/docs/administration/scim/entra/create-application.webp?fit=max&auto=format&n=VmH49kiwLiErec4u&q=85&s=320f614a2c7f13eec2b599cebe4eade1" alt="create-application" width="1280" height="983" data-path="content/docs/administration/scim/entra/create-application.webp" />

Select **Create your own application**. Give your application a descriptive name, and select **Integrate any other application you don't find in the gallery (Non-gallery)** option, then click **Create**.

<img src="https://mintcdn.com/dbx/VmH49kiwLiErec4u/content/docs/administration/scim/entra/create-own-application.webp?fit=max&auto=format&n=VmH49kiwLiErec4u&q=85&s=5b4f6eaf0eb390566a5000d5dd7ed600" alt="create-own-application" width="1280" height="989" data-path="content/docs/administration/scim/entra/create-own-application.webp" />

## Create provision

Go to the application detail page. Select **Provision User Accounts**.

<img src="https://mintcdn.com/dbx/VmH49kiwLiErec4u/content/docs/administration/scim/entra/provision-user-accounts.webp?fit=max&auto=format&n=VmH49kiwLiErec4u&q=85&s=7ae0184f27b0be980e569fdaf42ffce4" alt="provision-user-accounts" width="1280" height="1160" data-path="content/docs/administration/scim/entra/provision-user-accounts.webp" />

Click **Get Started** button.

<img src="https://mintcdn.com/dbx/VmH49kiwLiErec4u/content/docs/administration/scim/entra/provision-get-started.webp?fit=max&auto=format&n=VmH49kiwLiErec4u&q=85&s=a4262d1563df0537fe73fa1f3040d11d" alt="provision-get-started" width="1280" height="611" data-path="content/docs/administration/scim/entra/provision-get-started.webp" />

Change **Provisioning Mode** to **Automatic**.

<img src="https://mintcdn.com/dbx/VmH49kiwLiErec4u/content/docs/administration/scim/entra/provision-automatic.webp?fit=max&auto=format&n=VmH49kiwLiErec4u&q=85&s=973d01794c83c73e21c519d9f0f31acb" alt="provision-automatic" width="1280" height="438" data-path="content/docs/administration/scim/entra/provision-automatic.webp" />

Go to your Bytebase console, navigate to **Security & Policy** -> **Users & Groups** page. Click **Sync From Entra ID (Azure AD)**.

<img src="https://mintcdn.com/dbx/VmH49kiwLiErec4u/content/docs/administration/scim/entra/bytebase-sync-from-entra.webp?fit=max&auto=format&n=VmH49kiwLiErec4u&q=85&s=e58820dd8fc823af87dac5212c58912b" alt="bytebase-sync-from-entra" width="1280" height="203" data-path="content/docs/administration/scim/entra/bytebase-sync-from-entra.webp" />

Copy the **Endpoint** and **Secret Token**.

<Note>
  Bytebase endpoint implements SCIM protocol, please make sure you have configured [External URL](/get-started/self-host/external-url) and it's network accessible from Entra.
</Note>

<img src="https://mintcdn.com/dbx/VmH49kiwLiErec4u/content/docs/administration/scim/entra/bytebase-setting.webp?fit=max&auto=format&n=VmH49kiwLiErec4u&q=85&s=8d81c6c6b92cf4b49ccc2826786c153e" alt="bytebase-setting" width="785" height="337" data-path="content/docs/administration/scim/entra/bytebase-setting.webp" />

Go back to Entra console, paste the `Endpoint` and `Secret Token` above to `Tenant URL` and `Secret Token` respectively.
Click **Test Connection** and save upon success.

<img src="https://mintcdn.com/dbx/VmH49kiwLiErec4u/content/docs/administration/scim/entra/provision-admin-credentials.webp?fit=max&auto=format&n=VmH49kiwLiErec4u&q=85&s=ac8fae53fd8d2362e343306808313fb9" alt="provision-admin-credentials" width="745" height="734" data-path="content/docs/administration/scim/entra/provision-admin-credentials.webp" />

## Edit attribute mapping

Continue the provision, click **Mappings** and click **Provision Microsoft Entra ID Groups**.

<img src="https://mintcdn.com/dbx/VmH49kiwLiErec4u/content/docs/administration/scim/entra/provision-group.webp?fit=max&auto=format&n=VmH49kiwLiErec4u&q=85&s=ada84f3f345022ba205b0045af21a0f9" alt="provision-group" width="1280" height="1154" data-path="content/docs/administration/scim/entra/provision-group.webp" />

Bytebase uses the group's `externalId` to uniquely identify a group. By default, Entra ID maps `objectId` to `externalId`, which is stable and recommended. You can optionally add a custom `email` attribute to sync the group email to Bytebase.

<Note>
  If you have an existing SCIM configuration that maps `externalId` to `mail`, it will continue to work. However, we recommend switching to the default `objectId` mapping for stability, since object IDs do not change when a group's email is updated.
</Note>

### Step 1 - Create a new `email` attribute

Click **Show advanced options**, then click **Edit attribute list for Bytebase**.

<img src="https://mintcdn.com/dbx/WAd8AYdoRAkL0vYU/content/docs/administration/scim/entra/mapping-create-email-attr.webp?fit=max&auto=format&n=WAd8AYdoRAkL0vYU&q=85&s=37548d3b10f007001d4dd042cf2d7740" alt="mapping-create-email-attr" width="3068" height="1840" data-path="content/docs/administration/scim/entra/mapping-create-email-attr.webp" />

Add a new attribute `email` with type `String`, then click **Save**.

<img src="https://mintcdn.com/dbx/WAd8AYdoRAkL0vYU/content/docs/administration/scim/entra/mapping-email-attr-config.webp?fit=max&auto=format&n=WAd8AYdoRAkL0vYU&q=85&s=9bb20cfdadf754d28d5d0d3d38e06ff3" alt="mapping-email-attr-config" width="2026" height="746" data-path="content/docs/administration/scim/entra/mapping-email-attr-config.webp" />

### Step 2 - Edit the mapping

Edit the attribute mapping:

* Click **Edit** for the `displayName` row. Change **Match objects using this attribute** to `No`.
* Click **Edit** for the `externalId` row. Change **Match objects using this attribute** to `Yes` and set **Matching precedence** to `1`.
* Add a new mapping row: set **email** to map to **mail**.

<img src="https://mintcdn.com/dbx/WAd8AYdoRAkL0vYU/content/docs/administration/scim/entra/mapping-edit-mapping.webp?fit=max&auto=format&n=WAd8AYdoRAkL0vYU&q=85&s=b6654159003b4079011914e8190e7bbd" alt="mapping-edit-mapping" width="1448" height="1156" data-path="content/docs/administration/scim/entra/mapping-edit-mapping.webp" />

The final mappings look like this.

<img src="https://mintcdn.com/dbx/WAd8AYdoRAkL0vYU/content/docs/administration/scim/entra/mapping-final.webp?fit=max&auto=format&n=WAd8AYdoRAkL0vYU&q=85&s=e82126d802326a99fd21455018ae401e" alt="mapping-final" width="2472" height="584" data-path="content/docs/administration/scim/entra/mapping-final.webp" />

## Assign users and groups

In order for your users and groups to be synced to Bytebase, you will need to assign them to your Entra SCIM application. Select **Users and groups** and click **Add user/group**.

<img src="https://mintcdn.com/dbx/VmH49kiwLiErec4u/content/docs/administration/scim/entra/add-user-group.webp?fit=max&auto=format&n=VmH49kiwLiErec4u&q=85&s=186967f115f56cdc79cfa6de34ab91b9" alt="add-user-group" width="1280" height="662" data-path="content/docs/administration/scim/entra/add-user-group.webp" />

Click **None selected** under the **Users and Groups**. Select the users and groups that you want to add to the SCIM application, and click **Select** and **Assign**.

<img src="https://mintcdn.com/dbx/VmH49kiwLiErec4u/content/docs/administration/scim/entra/assign-user-group.webp?fit=max&auto=format&n=VmH49kiwLiErec4u&q=85&s=01b3623845d4e07ce65f8062a584a75b" alt="assign-user-group" width="721" height="557" data-path="content/docs/administration/scim/entra/assign-user-group.webp" />

## Turn on provisioning

On the application overview page, click **Start provisioning**. To test syncing, we recommend starting with **Provision on demand** for a subset of users or groups.

<img src="https://mintcdn.com/dbx/VmH49kiwLiErec4u/content/docs/administration/scim/entra/start-provision.webp?fit=max&auto=format&n=VmH49kiwLiErec4u&q=85&s=2d0a8101889bb9e0e81aed3751eb8dfb" alt="start-provision" width="1280" height="668" data-path="content/docs/administration/scim/entra/start-provision.webp" />

Afterwards, Entra will sync the users and groups to Bytebase periodically.
