Sub topic 12
External Client Apps and Why They Replace Connected Apps
This chapter assumes you know what a connected app is, how OAuth settings and flows work, and how Setup, profiles, and permission sets are organized. It covers what an external client app (ECA) is and what problems it solves.
What an ECA is
An external client app is the newer way to register an external application with a Salesforce org. Like a connected app, it holds the OAuth configuration (consumer key, callback URL, scopes, enabled flows) that lets an outside program get tokens and call Salesforce APIs. Salesforce recommends ECAs for new integrations. Connected apps still work, but new development should start with ECAs.
Why Salesforce introduced them
A connected app mixes two concerns in one record. The developer decides which callback URL and scopes the app needs. The admin of each org decides who may use it and under what conditions. In a connected app these settings sit together, so packaging an app for other orgs can leak or overwrite choices that belong to the subscriber's admin.
ECAs split the two concerns:
- Settings are developer-owned. They describe what the app is: OAuth configuration, flows, and scopes.
- Policies are admin-owned. They describe how a given org lets the app run: permitted users, IP relaxation, refresh token behavior, and session rules.
The next chapter covers this split in detail. ECAs also support source-driven deployment through metadata, and they have an explicit distribution model (local or packaged).
Connected apps compared with ECAs
| Aspect | Connected app | External client app |
|---|---|---|
| Configuration model | Settings and policies in one record | Settings and policies kept separate |
| Typical owner | Mixed | Developer for settings, admin for policies |
| Distribution | Packaging possible, but policies can travel with it | Local or packaged, with a defined boundary |
| Deployment | Metadata supported, with secrets handled awkwardly | Designed for source-driven deployment |
| Recommended for new work | No | Yes |
What stays the same
The OAuth flows do not change. Authorization code with PKCE, JWT bearer, and client credentials work the same way against an ECA. You still send the consumer key and, where the flow needs it, a secret or signed assertion to the token endpoint. This request works with either app type once the app is set up:
curl https://MyDomain.my.salesforce.com/services/data/ \
-H "Authorization: Bearer $ACCESS_TOKEN"A valid token returns the list of REST API versions. An error here points to a token or policy problem, not to the app type.
Common mistakes
- Assuming an ECA is only a rename. The separation of settings and policies changes who edits what.
- Treating policies as part of the package. Each org's admin sets its own policies.
- Starting new work on a connected app because an existing tutorial uses one.
Exercise
A vendor ships an integration to many customer orgs. Why does the ECA model suit this better than a connected app?
Show answer
The vendor owns the settings (callback URL, scopes, flows) and ships them in a package. Each customer admin sets their own policies, such as permitted users and IP relaxation. The vendor's package therefore cannot overwrite the subscriber's access decisions.