ExternalClientApplication defines the header for an external client application (ECA). It establishes the app's metadata identity, distribution state, descriptive information, and visibility as a packaged component in subscriber orgs, which are orgs where the package is installed.
The header is not the app's complete authentication configuration. OAuth settings and configurable policies reside in separate metadata components. Retrieving or comparing only ExternalClientApplication leaves out settings that can affect authorization, and the header alone cannot establish that the app is ready for use.
Key Elements
| Element | What the Element Controls |
|---|---|
fullName |
The inherited metadata component name. This identifies the header component and is distinct from orgScopedExternalApp. |
orgScopedExternalApp |
A separate unique identifier in the expected format [Organization_ID]:[External Client App Name]. A developer can define it, or Salesforce can generate it during the first deployment. |
distributionState |
The app's distribution state. Supported values include Local and Packaged. The additional defined values AutoInstalled and Managed are for internal use only. |
isProtected |
Controls the packaged component's visibility in subscriber orgs. Defaults to false. It does not control OAuth authorization. |
managedType |
For internal use only. It is not a substitute for distributionState. |
label |
The display label for the external client app, rather than its metadata identity or org-qualified identifier. |
contactEmail |
The email address Salesforce uses to contact the external client app administrator for the subscriber org. |
contactPhone |
The phone number Salesforce uses to contact the external client app administrator for the subscriber org. |
infoUrl |
Reserved for future use. Do not treat the presence of a URL here as an active configuration capability. |
Behavior and Constraints
Access to this metadata type requires the org to enable the "Opt in to External Client Apps" permission in Setup.
Keep the app's identifiers separate. fullName identifies the metadata component, while orgScopedExternalApp combines an organization ID and an external client app name. The org-qualified value matters when examining the app's origin and packaging; it is not simply a display label.
Distribution, installation, visibility, and authorization are different concerns. distributionState describes distribution, while isProtected controls package-component visibility. Neither element describes the app's OAuth flows, scopes, run-as user, or complete authorization policy. Changing a header value is not evidence that installation or subscriber-specific setup is complete.
The related settings and policy components are optional connections, not a requirement that every app use every component. Their presence and configuration must be examined separately from the header.
Deployment and Retrieval
ExternalClientApplication components use the .eca suffix and reside in the externalClientApps folder. In package.xml, use ExternalClientApplication as the type name. The type supports the * wildcard for manifest members.
OAuth settings and policies have their own manifest entries. A retrieval covering the header, OAuth settings, and application and OAuth policies can include ExternalClientApplication, ExtlClntAppOauthSettings, ExtlClntAppGlobalOauthSettings, ExtlClntAppOauthConfigurablePolicies, and ExtlClntAppConfigurablePolicies as separate types. Select the companion components that apply to the app; a header-only inventory omits their configuration.
For cross-org distribution, distinguish setting distributionState to Packaged from installing the resulting package in a consuming org. Community reports also identify app origin and subscriber policy configuration as separate causes of packaging or authorization failures. These reports are described below; they are not additional header elements.
Relationships
Separate OAuth settings and policy components reference this header through their own externalClientApplication element. These are incoming references, not nested fields of ExternalClientApplication. The connections cover OAuth settings, application and OAuth policies, and mobile, push, and SAML policies.
Referenced By
-
ExtlClntAppConfigurablePolicies:externalClientApplication -
ExtlClntAppGlobalOauthSettings:externalClientApplication -
ExtlClntAppMobileConfigurablePolicies:externalClientApplication -
ExtlClntAppOauthConfigurablePolicies:externalClientApplication -
ExtlClntAppOauthSettings:externalClientApplication -
ExtlClntAppPushConfigurablePolicies:externalClientApplication -
ExtlClntAppSamlConfigurablePolicies:externalClientApplication
Reported Issues
-
"External client app is not installed in this org" does not identify a single cause. In a 2026 discussion, cross-org guidance described creating the app in a persistent org, such as production, a Dev Hub, or a Developer Edition org, setting
distributionStatetoPackaged, and installing its managed package in each consuming org. Missing installation was associated with the error. However, the question also reported the same error withLocalin the owning org, so the message alone does not prove that package installation is the cause. See the installation and distribution discussion. -
App origin can block second-generation package creation. A 2026 namespace-org report encountered "External client apps that are created in ephemeral orgs can't be packaged." The author reported resolving the problem by setting
enablePackageEcaOauthFromDevOrgtotrueboth in the namespace org's External Client App settings and underexternalClientAppSettingsin the scratch-org definition. The reported procedure retrieved and deployedSettings:ExternalClientAppto update the namespace org; it did not require packaging that settings component. This is an org-setting configuration, not anExternalClientApplicationelement, and the resolution is specific to that packaging scenario rather than a universal header requirement. See the reported namespace-org resolution and External Client App settings reference. -
Installing a managed package may leave Client Credentials Flow setup unfinished. A 2026 implementation report describes subscriber administrators enabling Client Credentials Flow in the app's Policies and selecting the integration/run-as user. That user's permissions are configured separately. A deployed header or successful package installation therefore cannot demonstrate that these subscriber-specific steps are complete. See the subscriber setup report.
-
"no valid scopes defined" was associated with the Full access scope in subscriber orgs. The same 2026 managed-package implementation report recommends using the
apiscope instead. Treat this as a reported diagnostic for that implementation, not a universal restriction on the Full access scope. See the scope diagnosis. -
Associating a managed permission set with an installed ECA can fail when saving the app. A discussion with a 2026 follow-up reports a save failure containing
entity=SetupEntityAccess component=null, state=MANAGED_INSTALLEDwhen selecting a managed or namespaced permission set. The answer reports that local permission sets worked and that a support case was opened. This concerns associating a permission set with the ECA, not assigning a permission set to an integration user, and does not establish a confirmed general prohibition. See the permission-set association report. -
An unlocked-package installation was reported to leave OAuth policies uneditable. In an unanswered 2025 report, the author could package only
ExternalClientApplicationandExtlClntAppOauthSettings; attempts to include other app metadata failed during package creation. After installation, the author reported being unable to edit OAuth policies, enable Client Credentials Flow, or view the consumer key and secret. The discussion provides no confirmed resolution and does not establish a general restriction for all package types. See the unlocked-package setup report.
Common Questions
How do I retrieve ExternalClientApplication metadata?
Use ExternalClientApplication in package.xml; wildcard members are supported. Components use the .eca suffix in externalClientApps. Add separate manifest entries for the relevant OAuth settings and policy components when you need more than the header.
Does ExternalClientApplication include OAuth settings and policies?
No. It is the header component. OAuth settings and policies are separate components that reference it through their own externalClientApplication element.
What is orgScopedExternalApp?
It is a unique identifier with the expected format [Organization_ID]:[External Client App Name]. A developer can define it, or Salesforce can generate it during the first deployment. It is separate from the inherited fullName metadata identity.
Why do I get "External client app is not installed in this org"?
Community guidance associates the error with using a packaged app without installing its managed package in the consuming org. However, the same discussion reports the error for a Local app in its owning org. The error message alone is not enough to establish the cause.
Does installing the package finish Client Credentials Flow setup?
Not necessarily. Reported managed-package implementations require the subscriber administrator to enable Client Credentials Flow in Policies, select the integration/run-as user, and configure that user's permissions separately. The header does not show whether those steps are complete.