Overview
This article describes how to create a Salesforce External Client App (ECA) for a Riva Sync On-Premise OAuth connection and configure Riva to support Refresh Token Rotation (RTR).
Refresh Token Rotation improves security by replacing the refresh token after each successful token refresh.
Who is this for?
Riva Cloud customers
- Refresh Token Rotation (RTR) is required by Salesforce for AppExchange applications.
- Riva Cloud supports RTR automatically. Customers running a supported version of Riva do not need to perform any additional configuration.
Riva On-Premise customers
- Follow the steps below to configure RTR.
Before You Begin
- Prepare the Salesforce connection user and required permissions. See Prepare Salesforce for the Riva Sync.
- Obtain the callback URL for your Riva Sync connection.
- Confirm that your installed Riva version supports Salesforce’s required OAuth security controls.
Refresh Token Rotation requires Riva Sync 2026.2-net48 or later, or Riva Sync 2026.3 (.NET 8) or later. These minimum versions establish refresh-token rotation (RTR) support; confirm PKCE compatibility separately. See Refresh-Token Rotation Requirements.
Create an External Client App
- In Salesforce, open Setup.
- In Quick Find, enter External.
- Select External Client App Manager.
- Select New External Client App.
-
Enter the following basic information:
Field Value External Client App Name A descriptive name, such as Riva Sync On-PremiseAPI Name Accept the generated value Contact Email Your administrator’s email address Distribution State Local
For additional information, see Salesforce ECA Creation Instructions.
Configure OAuth
- Expand API (Enable OAuth Settings).
- Select Enable OAuth.
- Enter the callback URL for your Riva Sync connection. Use the same value when configuring the connection in Riva.
-
Select these OAuth scopes:
Scope Salesforce Label idAccess the identity URL service apiManage user data via APIs refresh_token, offline_accessPerform requests at any time - Under Flow Enablement, select Enable Authorization Code and Credentials Flow for browser-based authorization. Salesforce distinguishes this flow from Client Credentials Flow. See Salesforce OAuth Flow Guidance.
- Retain the required Salesforce security controls, including:
- Require Proof Key for Code Exchange (PKCE) extension for Supported Authorization Flows
- Enable Refresh Token Rotation
- Limit Idle Refresh Token Time-to-Live (TTL) to 30 Days
Salesforce requires these controls for local apps created on or after July 9, 2026. Verify Riva compatibility before proceeding. See Salesforce Security Requirements.
- Select Create.
Access the Consumer Key and Consumer Secret
- Open the new app in External Client App Manager.
- Select Settings and expand OAuth Settings.
- Select Consumer Key and Secret.
- Store both values securely for the Riva connection configuration.
Configure Refresh Token Rotation in Riva
Add the following setting to the application configuration for each applicable Riva component:
- RAS application configuration.
- Sync node application configuration.
- Riva On-Premise application configuration.
Sync.Crm.RefreshTokenRotationManagementEnabled=true
A restart or reauthorization is normally not required.
Create and Verify the Connection
Use the Consumer Key, Consumer Secret, and matching callback URL to create and test the Salesforce connection in Riva Manager.
Confirm that:
- Authorization succeeds.
- Synchronization continues through subsequent token renewals.
- No
invalid_grantorinvalid_sessionerrors occur.
If an invalid_grant error occurs, revalidate the Salesforce connection to obtain a new refresh token. If errors persist or synchronization does not resume, contact the Riva Support Team.
Related to