# Synchronize Microsoft Outlook Contacts to Cloud Voice

The Microsoft Entra ID (Azure Active Directory) integration can copy Outlook contacts into Cloud Voice as a one-way synchronization. Two kinds of contacts are supported: each user's personal Outlook contacts and the contacts stored in Outlook shared mailboxes. Once the sync runs, users who were provisioned from Microsoft Entra ID can look up and call those contacts straight from the Cloud Voice App.

## Prerequisites

- Cloud Voice is already connected to Microsoft Entra ID. Which procedure you follow depends on your firmware version:
  - **Version 84.22.0.138 or later**: [integrate Cloud Voice with Microsoft Entra ID](/pbx/integrations/azure-ad/integrate-cloud-voice-cloud-voice-with-azure-active-directory/).
  - **Versions earlier than 84.22.0.138**: [integrate Cloud Voice with Microsoft Entra ID using the legacy method](/pbx/integrations/azure-ad/integrate-cloud-voice-cloud-voice-with-azure-active-directory-legacy/).
- You have already [synced users from Microsoft Entra ID to Cloud Voice](/pbx/integrations/azure-ad/synchronize-azure-ad-users-to-cloud-voice-cloud-voice/).

## Synchronize personal Outlook contacts to the Cloud Voice App

To pull in personal contacts, you choose which users are included on Cloud Voice, and each of those users shares their personal contacts folder with the [authorization account](/pbx/integrations/azure-ad/integrate-cloud-voice-cloud-voice-with-azure-active-directory-legacy/#integrate_azure_active_directory_with_yeastar_p_series_pbx__ad-account), the account that authorized the Microsoft Entra ID integration, so Cloud Voice is allowed to read the contacts.

:::note
If you set up the integration with the simplified method (available on version 84.22.0.138 or later), this only requires the Cloud Voice configuration in Step 1. There is no need to grant any additional permissions inside Microsoft.
:::

### Step 1. Choose which users' personal contacts to sync

1. Sign in to the Cloud Voice management portal and go to **Integrations > Collaboration**.
2. Find the **Microsoft Outlook Contacts Synchronization** section and turn the switch on.

   ![Microsoft Outlook contacts synchronization toggle in the Collaboration settings](/images/pbx/enabel-outlook.jpg)
3. Select the **Contacts Synchronization** checkbox.
4. Open the **User Range for Contacts Synchronization** drop-down list and pick a range.

   :::caution
   The range you pick here must fall within [the user range you chose when syncing users from Microsoft Entra ID](/pbx/integrations/azure-ad/synchronize-azure-ad-users-to-cloud-voice-cloud-voice/#synchronize-azure-ad-users-to-yeastar-p-series-pbx__ul_orr_bks_bgc). Only users who have already been synced are eligible.
   :::

   | Option | What it does |
   | --- | --- |
   | All Users | Syncs every user's personal contacts into their own Cloud Voice App Contacts directory. |
   | Users in Specific Group | Syncs the personal contacts of users in the group(s) you name. Pick the groups from the **Group** drop-down list. |
   | Specific Users | Syncs the personal contacts of the individual users you select. Click **Select All Synced Users** to quickly add every Microsoft Entra ID user already synced to Cloud Voice. |

   ![The All Users range selected for contacts synchronization](/images/pbx/outlook-all-contacts.png)

   ![The Users in Specific Group range with a group chosen](/images/pbx/outlook-specific-group.png)

   
   ![Cloud Voice, the Specific Users range with individual users selected](/images/pbx/outlook-specific-users.png)
5. Click **Save**.

### Step 2. Share the personal contacts folder in the Outlook desktop client

:::note
This step is only needed when the integration uses the legacy method.
:::

The steps below show how one Microsoft Entra ID user shares their personal Outlook contacts folder from the Outlook desktop client. Every user you included in the range in Step 1 must complete this on their own account. Any selected user who skips it will not have their personal contacts synced.

1. Sign in to the Outlook desktop client and open the ![People](/images/pbx/outlook-contact-icon.jpg) **People** view.
2. Under **My Contacts**, right-click the personal contacts folder and choose **Properties...**.
3. In the dialog that opens, find and add the authorization account (the account that authorized the Microsoft Entra ID integration).

   ![The Permissions tab with the authorization account being added](/images/pbx/outlook-search-integration-account.jpg)

   1. Open the **Permissions** tab.
   2. Click **Add** and search for the authorization account.
   3. Double-click the authorization account, then click **OK**.
4. Give the authorization account read access to the contacts in the folder.

   ![Read permission set to Full Details for the authorization account](/images/pbx/grant-integration-account-contacts-access.jpg)

   1. In the list of users at the top, select the authorization account.
   2. Under **Read**, choose **Full Details**.
   3. Under **Other**, select **Folder contact**.
   4. Click **OK**.

   :::note
   Cloud Voice syncs at the time set for [automatic directory synchronization](/pbx/integrations/azure-ad/schedule-automatic-directory-synchronization/). To pull the contacts in right away, [run a directory synchronization manually](/pbx/integrations/azure-ad/manually-perform-a-directory-synchronization/).
   :::

### Result

Each selected user's personal Outlook contacts now appear in their Cloud Voice App Contacts directory, tagged with a ![Microsoft source](/images/pbx/microsoft.png) label to show where they came from. These synced contacts are read-only, they can't be edited or deleted from the Cloud Voice App.

![Cloud Voice, synced Outlook contacts shown in the Contacts directory](/images/pbx/synced-outlook-contacts.jpg)

:::caution[Some contacts didn't sync?]
Missing details on an Outlook contact can stop it from syncing. Confirm the following are filled in, then run the directory synchronization again:

- **First name** or **Last name**: at least one is required.
- **Mobile phone number**, **Home phone**, or **Business phone**: at least one is required.
:::

## Synchronize Outlook shared mailbox contacts to Cloud Voice phonebooks

To bring in contacts from shared mailboxes, configure shared-contacts syncing in Cloud Voice, then add the [authorization account](/pbx/integrations/azure-ad/integrate-cloud-voice-cloud-voice-with-azure-active-directory-legacy/#integrate_azure_active_directory_with_yeastar_p_series_pbx__ad-account) as a member of each shared mailbox in the Microsoft 365 admin center. That membership is what lets Cloud Voice read the contacts inside those mailboxes.

:::note
If you set up the integration with the simplified method (available on version 84.22.0.138 or later), this only requires the Cloud Voice configuration in Step 1, no extra permission work in Microsoft is needed.
:::

### Step 1. Set up shared-mailbox contact syncing in Cloud Voice

1. Sign in to the Cloud Voice management portal and go to **Integrations > Collaboration**.
2. Find the **Microsoft Outlook Contacts Synchronization** section and turn the switch on.

   ![Microsoft Outlook contacts synchronization toggle in the Collaboration settings](/images/pbx/enabel-outlook.jpg)
3. Select the **Shared Mailbox Contacts Synchronization** checkbox.
4. Open the **Shared Mailbox Contacts Synchronization** drop-down list and pick a range.

   | Option | What it does |
   | --- | --- |
   | Contacts in All Shared Mailboxes | Syncs contacts from every Outlook shared mailbox into Cloud Voice phonebooks. |
   | Contacts in Specific Shared Mailboxes | Syncs contacts from only the shared mailboxes you choose in the **Shared Mailboxes** drop-down list. |
5. Enter the phonebook name that the shared contacts should sync into.

   
   ![Cloud Voice, naming the phonebook for shared mailbox contacts](/images/pbx/set-phonebook-name-for-shared-mailboxes.jpg)
6. Click **Save**.

### Step 2. Add the authorization account to the shared mailboxes in Microsoft 365

:::note
This step is only needed when the integration uses the legacy method.
:::

1. Sign in to the [Microsoft 365 admin center](https://admin.microsoft.com/).
2. In the left navigation, open **Teams & groups** and select **Shared mailboxes**.
3. Click the shared mailbox you want, then:
   1. In the **Members** section, click **Edit**.
   2. Click **Add members** and search for the authorization account (the account that authorized the Microsoft Entra ID integration).
   3. Select the authorization account and click **Add**.
4. Repeat step 3 for every shared mailbox you want to sync.

:::note
Cloud Voice syncs at the time set for [automatic directory synchronization](/pbx/integrations/azure-ad/schedule-automatic-directory-synchronization/). To pull the contacts in right away, [run a directory synchronization manually](/pbx/integrations/azure-ad/manually-perform-a-directory-synchronization/).
:::

### Result

After the sync runs:

- The shared mailboxes and their contacts appear in a Cloud Voice phonebook, tagged with a ![Microsoft source](/images/pbx/microsoft.png) label. The synced phonebook is read-only and can't be edited or deleted in Cloud Voice.

  
  ![Cloud Voice, synced shared mailbox contacts in a phonebook](/images/pbx/shared-ailboxes-synced.jpg)

  :::caution[Some contacts didn't sync?]
  Missing details on an Outlook contact can stop it from syncing. Confirm the following are filled in, then run the directory synchronization again:

  - **First name** or **Last name**: at least one is required.
  - **Mobile phone number**, **Home phone**, or **Business phone**: at least one is required.
  :::

- By default, the synced phonebook is hidden from users. To let users see the phonebook and its contacts, go to **Extension and Trunk > Client Permission > Contact Visibility** and grant access.

  :::note
  A user with access can open the Cloud Voice App, go to **Contacts**, and select the phonebook to browse its entries.
  :::
