--- title: "Rotating Client Secrets" slug: "rotating-client-secrets-sfmc" description: "Learn how to rotate Salesforce Marketing Cloud OAuth 2.0 client secrets to maintain Relay Network integration without downtime. Follow the step-by-step guide." updated: 2026-09-23T18:27:47Z published: 2026-09-23T18:27:47Z canonical: "docs.relaynetwork.com/rotating-client-secrets-sfmc" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.relaynetwork.com/llms.txt > Use this file to discover all available pages before exploring further. # Rotating Client Secrets > [!CAUTION] > **Before you begin, confirm you have both of the following available:** > > - A **Salesforce Marketing Cloud Admin** — needed to generate and activate the staged secret in Installed Packages. > - A **Relay CX Builder Client Admin or Client User with Integration** — needed to update the Push API Integration with the new secret. > > Both roles are required. If the rotation is attempted without one of them, you won't be able to complete the process without stopping partway through. ## Overview Salesforce OAuth 2.0 client secrets for Marketing Cloud Engagement Installed Packages expire on a recurring basis and must be rotated periodically to keep the Relay Network integration authenticated. If a secret expires before it's rotated, the integration will stop authenticating and Relay journey activities in Marketing Cloud will fail. **When:** Every client secret has a **180-day expiration**, starting on the day it's generated or last rotated. Salesforce sends email and in-app banner notifications in Marketing Cloud Engagement in the days leading up to each expiration. You can check expiration dates for all secrets at any time — see [For Future Rotations](/docs/rotating-client-secrets-sfmc#for-future-rotations-every-180-days) below. **How it works:** Marketing Cloud uses a stage → test → activate process, so the secret can be rotated with zero downtime. You generate a new ("staged") secret alongside the existing one, update Relay CX Builder to use it, confirm the integration is working, and only then activate the new secret — which immediately and permanently revokes the old one. > [!WARNING] > ⚠️ **Order matters.** Complete the steps below in the exact order listed. Activating the new secret in Marketing Cloud before updating it in CX Builder will break the integration. --- ## Step-by-Step: Rotating the Secret ### Step 1: Stage the new secret in Marketing Cloud 1. In Salesforce Marketing Cloud, go to **Setup**, then use Quick Find to search for **"Installed Packages."** Open the **Relay Network** package. ![](https://cdn.us.document360.io/6738087b-455d-402f-b70a-a44a4231547e/Images/Documentation/Screenshot 2026-09-23 at 1.13.49 PM.png) 1. In the **Staged Secret** section, click **Generate**. ![](https://cdn.us.document360.io/6738087b-455d-402f-b70a-a44a4231547e/Images/Documentation/Screenshot 2026-09-23 at 1.14.54 PM.png) 1. Enter a description for the secret, click **Next**, then save it before clicking **Finish**. ![](https://cdn.us.document360.io/6738087b-455d-402f-b70a-a44a4231547e/Images/Documentation/Screenshot 2026-09-23 at 1.22.39 PM.png) ![](https://cdn.us.document360.io/6738087b-455d-402f-b70a-a44a4231547e/Images/Documentation/Screenshot 2026-09-23 at 1.22.58 PM.png) > [!CAUTION] > You cannot view the secret again after this step, so copy it somewhere secure before moving on. 1. Wait **five minutes** before continuing to the next step, to allow the staged secret to propagate. --- ### Step 2: Update the new secret in Relay CX Builder Before doing anything else in Marketing Cloud, log in to **Relay CX Builder** and update the integration with the new secret: 1. Go to **API Management,** and click the **Push API Integration** tab**.** ![](https://cdn.us.document360.io/6738087b-455d-402f-b70a-a44a4231547e/Images/Documentation/image-20230614-162955 (2).png) 2. Open your **Marketing Cloud integration** by clicking the **Edit** icon. ![](https://cdn.us.document360.io/6738087b-455d-402f-b70a-a44a4231547e/Images/Documentation/Screenshot 2026-09-23 at 1.24.22 PM.png) 3. Replace the **Client Secret** field with the new staged secret from Step 1. ![](https://cdn.us.document360.io/6738087b-455d-402f-b70a-a44a4231547e/Images/Documentation/Screenshot 2026-09-23 at 1.24.42 PM.png) 4. Scroll down to Click **Save**. ![](https://cdn.us.document360.io/6738087b-455d-402f-b70a-a44a4231547e/Images/Documentation/Screenshot 2026-09-23 at 1.24.52 PM.png) --- ### Step 3: Activate the secret in Marketing Cloud Only after Step 2 is complete, return to Salesforce Marketing Cloud and activate the staged secret: 1. Go to **Setup > Installed Packages > Relay Network package > Staged Secret**, then click **Activate**. ![](https://cdn.us.document360.io/6738087b-455d-402f-b70a-a44a4231547e/Images/Documentation/Screenshot 2026-09-23 at 1.26.08 PM(1).png) > [!CAUTION] > Activating immediately deactivates the old secret. This cannot be undone — the old secret cannot be reactivated. ![](https://cdn.us.document360.io/6738087b-455d-402f-b70a-a44a4231547e/Images/Documentation/Screenshot 2026-09-23 at 1.26.28 PM.png) --- ### Step 4: Verify the integration Confirm that events are still flowing between Marketing Cloud and Relay CX Builder. Check that journey activities are triggering as expected and that no authentication errors are appearing in either system. --- ## Additional Considerations - Marketing Cloud accepts **both** the old and new secret during the rotation window — this is what allows the stage/test/activate process to happen without downtime. - **Do not activate before updating CX Builder.** Activating first immediately revokes the old secret and will break the integration until the new one is saved in CX Builder. - Enter the new secret **directly into CX Builder**. Do not send client secrets to Relay by email or chat. ## For Future Rotations (Every 180 Days) Secret rotation is a recurring task, not a one-time event. You can check expiration dates for all secrets at any time in the summary table in Salesforce Marketing Cloud on the Installed Packages page in Setup. Consider setting a recurring reminder ahead of each 180-day expiration so rotation happens proactively rather than in response to an expiration notice. ## Additional Resources - [Salesforce: Rotate a Client Secret for an Installed Package](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/rotate-oauth2-secret.html) - [Relay Network Configuration Documentation](https://docs.relaynetwork.com/docs/configuration)