# Update Client Secret for Microsoft Entra ID Integration

Every client secret you create for a Microsoft Entra application carries an expiration date. Once that secret lapses, Cloud Voice can no longer authenticate against Microsoft Entra ID and directory synchronization stops. To keep contacts and users in sync, generate a fresh secret and apply it to Cloud Voice before the current one expires.

:::note
These steps apply only to the legacy integration. If you connected Cloud Voice to Microsoft Entra ID using the [simplified integration method](/pbx/integrations/azure-ad/integrate-cloud-voice-cloud-voice-with-azure-active-directory/), the application credentials are managed for you and there is no secret to update by hand.
:::

## Before you start

Make sure you have:

- Connected Cloud Voice to Microsoft Entra ID through the [legacy method](/pbx/integrations/azure-ad/integrate-cloud-voice-cloud-voice-with-azure-active-directory-legacy/).
- [Created a new client secret](/pbx/integrations/azure-ad/integrate-cloud-voice-cloud-voice-with-azure-active-directory-legacy/#integrate_azure_active_directory_with_yeastar_p_series_pbx__section_nw1_y4c_c5b) for the Microsoft Entra application and copied its value.

## Apply the new secret

1. Sign in to the Cloud Voice web portal and open **Integrations > Collaboration**.
2. In the top-right corner of the **Basic** section, click **Update Client Secret**.

   ![Update Client Secret control in the top-right of the Basic section](/images/pbx/click-to-update-secret.png)

3. In the dialog that appears, do the following:

   ![Dialog for entering the replacement client secret](/images/pbx/enter-new-client-secret.png)

   a. Paste the new value into the **Client Secret** field.

   b. Click **Save**.

:::tip
When you generate the new secret in Microsoft Entra, note its expiration date and set a calendar reminder to renew it a week or two ahead. Since a lapsed secret silently stops directory synchronization, renewing early is the easiest way to avoid an interruption.
:::

Cloud Voice now authenticates with the updated secret, and directory synchronization continues without interruption.
