Unified.to
All articles

SalesForce (External Client Apps) on Multiple Organizations


April 15, 2026

This guide will walk you through the required steps to support using a Salesforce External Client App (ECA) across multiple organizations. When an ECA is created in Salesforce, it can only connect to users within the organization that created it. To allow the ECA to be used across multiple organizations, you must complete the required setup steps before it can connect to users outside the original organization. The customer's Salesforce admin does not need to give anyone their Salesforce credentials, they can run the second set of steps below.

  1. The first thing you need to do is create an ECA within Salesforce. If you have already done this proceed to step 2, otherwise check out our how to guide.

Screenshot_2026-04-29_at_11.06.56_AM.png

  1. Install SalesForce CLI
  2. Generate a SalesForce project
    sf project generate --name unified-sf
    
  3. Navigate into project
    cd unified-sf
    
  4. Login to your Source organization, this is the organization where you have created the External client app
    sf org login web --alias SourceOrg
    
  5. Retrieve the app metadata (Replace APP_API_NAME with your app name, which can be found at Setup → External Client Apps → open your app → settings → basic information → API Name
    sf project retrieve start --metadata ExternalClientApplication:APP_API_NAME --target-org SourceOrg
    sf project retrieve start --metadata ExtlClntAppOauthSettings --target-org SourceOrg
    
  6. Create a zip of the project folder to give to the customer who wants to install your app.
    zip -r ../my_project.zip . --exclude "*/.git/*" --exclude "*/.sfdx/*"
    

Customer Steps (Customer Salesforce admin)

  1. Customer opens the project folder
cd my_project
  1. Install SalesForce CLI
  2. Customer admin logs into the TargetOrg
sf org login web --alias TargetOrg
  1. The customer will need to make some changes within their Salesforce to deploy the app. In the SalesForce Dev Hub > Settings > Setup > Dev Hub, enable both 'Enable Unlocked Packages and Second-Generation Managed Packages' and 'Enable Dev Hub'

Screenshot_2026-04-15_at_3.37.45_PM.png

Screenshot_2026-04-15_at_1.44.39_PM.png

  1. Customer deploys the ECA app
sf project deploy start --metadata ExternalClientApplication:APP_API_NAME --target-org TargetOrg
sf project deploy start --metadata ExtlClntAppOauthSettings:APP_API_NAME_oauth --target-org TargetOrg
  1. The customer can then verify that the app has been added to their organization by visiting Setup → External Client Apps → external client app manager where they should see your app installed.

Screenshot_2026-04-29_at_11.06.47_AM.png

  1. The customer can now create a connection to your app
All articles