# Synchronize Users from Red Hat SSO to Cloud Voice

Once Cloud Voice is connected to Red Hat SSO (Red Hat's Single Sign-On service, which lets people use one set of credentials across apps), you can pull accounts from your Red Hat directory into Cloud Voice and give each person an extension. Synced users then place and receive calls on their office extension while signing in with the Red Hat credentials they already have.

## Before you begin

The number of users you can bring across is limited by how many extensions your Cloud Voice system can create. The sync never adds more extensions than your system supports.

You also decide which accounts are pulled in. Cloud Voice offers four synchronization scopes:

- **All users**: every account in the organization. Extensions are created and linked automatically, following the assignment rule you set.
- **Users in a specific organizational unit**: only accounts in the organizational unit(s) you choose. Extensions are created and linked automatically.
- **Users in a specific group**: only accounts in the group(s) you choose. Extensions are created and linked automatically.
- **Specific users**: a hand-picked list of accounts. You assign each extension yourself, so the extensions must already exist before you set up the sync.

The first three scopes share one procedure, covered next. For a curated list, skip to [Synchronize specific users](#synchronize-specific-users).

## Synchronize all users, an organizational unit, or a group

1. Sign in to the Cloud Voice management portal and go to **Integrations > Collaboration**. Scroll down to the **User Synchronization** section.
2. In the **User Range for Extension Auto Creation** list, choose the scope you want:
   - **All Users**: no further selection is needed.

     ![Directory sync configured to bring in every Red Hat account](/images/pbx/google-sync-all-user.png)
   - **Users in Specific Organizational Unit**: then pick one or more units in the **Organizational Units** list.

     ![Directory sync limited to selected organizational units](/images/pbx/google-sync-ou-user.png)
   - **Users in Specific Group**: then pick one or more groups in the **Group** list.

     ![Directory sync limited to selected groups](/images/pbx/google-sync-group-user.png)
3. For an organizational unit or group scope, select **Auto delete the Extensions no longer in sync** if you want Cloud Voice to remove extensions automatically once their user falls outside the chosen scope.

   :::note
   This keeps unused extensions from piling up when you later change what the sync covers.
   :::
4. Define how extensions are assigned to the synced users.

   ![Extension assignment policy options for synced users](/images/pbx/google-extension-assignment.png)

   1. In the **User's Extension Number** list, choose the numbering rule:
      - **Assign Automatically**: extension numbers are handed out in sequence, starting from the value you enter in **Start Extension Number from**.
      - **Read Specific Property Value**: extension numbers are taken from a user account property; name that property in the **Property Name** field.
   2. In the **Delete the Extension when its associated user account is** list, choose the account status(es) that make Cloud Voice stop syncing a user and delete their extension.

      ![Choosing which account statuses trigger extension deletion](/images/pbx/delete-ext.png)
   3. For **Auto associate Extensions with the Users that share the same email address**, decide how Red Hat users whose email matches an existing extension are handled:
      - **Selected**: a user whose Red Hat email (read from the Red Hat field you map to **Email Address**) matches the **Email Address** of an existing extension is synced and linked to that extension. The extension's existing user details are overwritten with the user's.

        :::caution
        For security, restrict Red Hat SSO users from changing their own email addresses.
        :::
      - **Cleared**: such a user is not synced, because Cloud Voice does not allow duplicate email addresses.
5. To have Cloud Voice email each new user their Cloud Voice App sign-in details as soon as the extension is created, select **Send Welcome Email automatically after an extension is created**.
6. In the **Map** section, choose and pair the fields for the user information you want to bring over.

   ![Field mapping between Red Hat attributes and Cloud Voice extension fields](/images/pbx/user-map.png)
7. Click **Save**. Cloud Voice runs the first synchronization immediately. See [After the sync completes](#after-the-sync-completes) for what to expect.

## Synchronize specific users

:::caution
In this mode you assign extensions by hand, so create the extensions you plan to use before you set up the sync.
:::

1. Sign in to the Cloud Voice management portal, go to **Integrations > Collaboration**, and scroll down to the **User Synchronization** section.
2. Select the users you want and match each to an extension.

   ![Manually selecting Red Hat users and pairing them with extensions](/images/pbx/sync-specific-user.png)

   1. In the **User Range for Extension Auto Creation** list, select **Specific Users**.
   2. In the **Search Criteria** list, choose whether to look up users by organizational unit or by group, specify the target unit or group, and click **Search Users**. Matching accounts appear in the results.
   3. In the **Search Result List**, select the users you want, then click **Synchronize to Cloud Voice**.
   4. In the **Synchronization List**, pick an extension from the list to pair with each user.

      :::note
      To drop a user you have already selected, disassociate them in the Synchronization List.

      ![Removing a user that was selected for synchronization](/images/pbx/disassociate-user.png)
      :::
3. Set the extension management policies that apply when the sync scope or an account status changes.

   ![Extension management policies for manually synced users](/images/pbx/ext-mgt.png)

   1. Select **Auto delete the Extensions no longer in sync** to have Cloud Voice remove extensions tied to users who leave the sync.
   2. In the **Delete the Extension when its associated user account is** list, choose the account status(es) that make Cloud Voice stop syncing a user and delete their extension.
4. To send new users their Cloud Voice App sign-in details automatically, select **Send Welcome Email automatically after an extension is created**.
5. In the **Map** section, choose and pair the fields for the user information you want to bring over.

   ![Field mapping between Red Hat attributes and Cloud Voice extension fields](/images/pbx/user-map.png)
6. Click **Save**. Cloud Voice runs the first synchronization immediately. See [After the sync completes](#after-the-sync-completes).

## After the sync completes

When you save, Cloud Voice performs the initial synchronization right away. Once it finishes:

- A notification banner reports the result.

  ![Banner confirming the synchronization finished](/images/pbx/google-sync-all-result.png)
- The synced users appear as extensions under **Extension and Trunk > Extension**. Each one is tagged with a Red Hat marker and cannot be deleted from Cloud Voice.

  
  ![Cloud Voice, extension list showing accounts synced from Red Hat](/images/pbx/user-synced.png)

  :::note
  The **First Name**, **Last Name**, **Email Address**, **Mobile Number**, and **Job Title** of these extensions come from Red Hat, so they are read-only in Cloud Voice. Edit them in Red Hat and the changes flow back on the next synchronization.
  :::

## What to do next

Turn on Single Sign-On so the synced users can log in to the Cloud Voice App with their Red Hat credentials. See [Allow Users to Log in to the Cloud Voice App with Red Hat SSO](/pbx/integrations/red-hat/allow-users-to-log-in-to-cloud-voice-app-uc-clients-with-red-hat-sso/).
