# Synchronize Groups from Microsoft Entra ID to Cloud Voice

When Cloud Voice is connected to Microsoft Entra ID, you can choose which directory groups flow into your phone system and become extension groups. This page walks through defining that group synchronization rule and explains how the resulting extension groups behave.

## Before you begin

The integration between Cloud Voice and Microsoft Entra ID must already be in place. Which setup guide applies depends on your phone system's firmware version:

- **Firmware 84.22.0.138 or later**: follow [Integrate Cloud Voice with Microsoft Entra ID](/pbx/integrations/azure-ad/integrate-cloud-voice-cloud-voice-with-azure-active-directory/).
- **Firmware earlier than 84.22.0.138**: follow [Integrate Cloud Voice with Microsoft Entra ID (Legacy)](/pbx/integrations/azure-ad/integrate-cloud-voice-cloud-voice-with-azure-active-directory-legacy/).

:::note
Every synced group becomes an extension group, and Cloud Voice supports a maximum of 63 extension groups. That ceiling is the effective limit on how many Microsoft Entra ID groups you can bring in.
:::

## Define the group synchronization rule

1. Sign in to the Cloud Voice management portal and open **Integrations > Collaboration**.
2. Scroll to the **Group Synchronization** section and turn the switch on.

   ![Group Synchronization switch enabled in the Collaboration settings](/images/pbx/enable-group-sync.png)

3. Open the **Synchronize for** drop-down list and choose which groups to pull from Microsoft Entra ID.

   ![Synchronize for drop-down list with the available group selection modes](/images/pbx/aad-group-sync-for-1.png)

   | Option | What it syncs |
   | --- | --- |
   | All Groups | Brings in every group from your Microsoft Entra ID directory. |
   | Specific Group Type | Brings in only the group types you pick. After choosing this option, select one or more values in the **Type** drop-down: **Security Group** (all security groups in your directory) or **Microsoft 365** (all Microsoft 365 groups in your directory). |
   | Specific Group | Brings in a hand-picked set of groups. Search for and select the groups you want in the **Group** drop-down list. |

   :::note
   The **Group** drop-down shows up to 200 groups retrieved from Microsoft Entra ID by default. If your directory has more groups than that and you need them listed, contact Cloud Voice support to raise the limit.
   :::

   If you later narrow or change which groups are synced, use the **Auto delete the Extension Groups no longer in sync** option to decide what happens to extension groups that fall out of scope.

   ![Auto delete the Extension Groups no longer in sync option](/images/pbx/auto-delete-unsync-extension-group.png)

   - Selected: the orphaned extension groups are removed on the next synchronization.
   - Cleared: the extension groups stay in place and are then managed entirely by Cloud Voice.

   :::caution
   Selecting **Auto delete the Extension Groups no longer in sync** makes Cloud Voice delete those extension groups on the next synchronization, with no separate confirmation prompt. Turn it on only once you are certain the out-of-scope groups are no longer needed. Leave it cleared if you would rather keep the groups and manage them yourself in Cloud Voice.
   :::

4. Click **Save**.

   :::note
   The first time you save these synchronization settings, Cloud Voice runs an initial synchronization right away. On later changes, either [start a synchronization by hand](/pbx/integrations/azure-ad/manually-perform-a-directory-synchronization/) to apply the rule immediately or let the [scheduled synchronization](/pbx/integrations/azure-ad/schedule-automatic-directory-synchronization/) pick it up.
   :::

## What happens next

Your custom group synchronization rule is now saved. On each run, Cloud Voice queries Microsoft Entra ID against the rule and pulls in the matching groups along with any updated details. Once a synchronization completes:

- You can review the outcome in the **Group Synchronization** section.

  ![Group synchronization results listed in the Collaboration settings](/images/pbx/group-sync-result.png)

- Extension groups that map to Microsoft Entra ID groups are tagged with a Microsoft label ![Microsoft-linked group label](/images/pbx/microsoft.png) and cannot be deleted from Cloud Voice.
- You cannot edit the name or membership of a Microsoft Entra ID-linked extension group directly in Cloud Voice.

:::note
Change the name or members of a linked group in Microsoft Entra ID instead. Those edits reach your phone system on the next synchronization.
:::
