Create a Salesforce External Client App and Configure Refresh Token Rotation for Riva On-Premise

Evan Keefe
Evan Keefe
  • Updated

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

  1. In Salesforce, open Setup.
  2. In Quick Find, enter External.
  3. Select External Client App Manager.
  4. Select New External Client App.
  5. Enter the following basic information:

    Field Value
    External Client App Name A descriptive name, such as Riva Sync On-Premise
    API 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

  1. Expand API (Enable OAuth Settings).
  2. Select Enable OAuth.
  3. Enter the callback URL for your Riva Sync connection. Use the same value when configuring the connection in Riva.
  4. Select these OAuth scopes:

    Scope Salesforce Label
    id Access the identity URL service
    api Manage user data via APIs
    refresh_token, offline_access Perform requests at any time
  5. 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.
  6. 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.

  1. Select Create.

Access the Consumer Key and Consumer Secret

  1. Open the new app in External Client App Manager.
  2. Select Settings and expand OAuth Settings.
  3. Select Consumer Key and Secret.
  4. 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_grant or invalid_session errors 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