ExtlClntAppOauthSettings configures the OAuth plugin for an external client app. It defines requested OAuth access, developer-default attributes, trusted IP ranges, logout behavior, and settings for asset-token and first-party headless identity flows. Its required externalClientApplication element references ExternalClientApplication; this component is the app's OAuth plugin configuration, not the external client app definition itself.
Key Elements
| Element | What the Element Controls |
|---|---|
externalClientApplication |
Required reference to the associated ExternalClientApplication. |
commaSeparatedOauthScopes |
Comma-separated metadata scope names, such as Basic, Api, and RefreshToken. Spelling and case matter; these names are not interchangeable with OAuth protocol scope strings. |
commaSeparatedCustomScopes |
A separate comma-separated list of custom scope names. |
customAttributes |
Developer-default attributes, up to 128 entries. Each entry requires a unique key and a formula identifying an available existing field. |
trustedIpRanges |
Up to 128 IP ranges from which the app can be accessed without requiring the user to authenticate with the external client app. Each range requires inclusive startIpAddress and endIpAddress boundaries. |
isFirstPartyAppEnabled |
Whether a first-party app can send requests to the OAuth 2.0 authorization challenge endpoint on the Experience Cloud site for headless identity flows. |
clientAssertionCertificate |
The certificate used to sign a client attestation JSON Web Token (JWT) for first-party headless identity requests. Salesforce validates that JWT against the certificate to confirm the requesting app. |
assetTokenAudiences |
Required for the OAuth asset token flow. Supplies the JWT aud claim. Although the element is a string, its value must be an array of case-sensitive strings, each containing a StringOrURI value. |
assetTokenSigningCertificate |
Required for the asset token flow. Identifies the self-signed signing certificate by ID, not developer name. The certificate is limited to 4 KB. |
assetTokenValidity |
Required integer for the asset token flow. Its documented meaning uses UTC-epoch seconds and an assertion-expiration constraint, not simply a duration inferred from the field name. |
areAttributesIncludedInAssetToken |
Whether associated custom attributes appear in the asset token's JWT payload. Defaults to false. |
areCustomPermsIncludedInAssetToken |
Whether associated custom permissions appear in the asset token's JWT payload. Defaults to false. |
oauthLink |
Auto-generated linkage combining the org ID and OAuth Consumer ID. It is not a manually selected scope or credential setting. |
singleLogoutUrl |
The endpoint where Salesforce sends a logout request when a user logs out of Salesforce. |
Behavior and Constraints
Metadata access prerequisites
The org must enable Allow Access to OAuth Consumer Secrets via Metadata API in Setup to allow access to the OAuth plugin. Users with developer roles also need the View External Client Apps Consumer Secrets in Metadata user permission to configure OAuth settings.
These prerequisites govern access to the metadata. They are separate from OAuth scopes, which describe the access an app requests.
OAuth scope names and authorization
Use the documented metadata names in commaSeparatedOauthScopes, preserving their capitalization. Do not replace them with similarly named OAuth protocol scope strings.
-
Apipermits API access to the logged-in user's account.Fullpermits access to all data accessible by that user, not unrestricted access to all data in the org. -
Basicpermits access to the identity URL service. It is documented as equivalent to deployingAddress,Email,Phone, andProfile. -
RefreshTokenandOfflineAccesshave equivalent behavior. They allow a refresh token to be returned when the caller is eligible; declaring either scope does not guarantee that Salesforce issues one. -
CustomPermissionsexposes custom permissions associated with the external client app and whether the current user has each permission enabled. It provides permission information; it does not assign those permissions. -
PwdlessLogin,ForgotPassword, andUserRegistrationpermit access to the corresponding headless identity APIs. Their authenticated-request setup uses an internal integration user to obtain an access token.
Other documented scope values are Web, Chatter, CustomApplications, OpenID, Wave, Eclair, Pardot, Lightning, Content, CDPIngest, CDPProfile, CDPQuery, Chatbot, CDPSegment, CDPIdentityResolution, CDPCalculatedInsight, SFApiPlatform, Interaction, EinsteinGPT, MCP, and SCRT.
Custom scope names belong in commaSeparatedCustomScopes, separately from the metadata scope names in commaSeparatedOauthScopes.
First-party identity and asset tokens use different certificates
isFirstPartyAppEnabled controls access to the Experience Cloud site's authorization challenge endpoint using the OAuth 2.0 for First-Party Applications draft protocol. For these headless identity requests, clientAssertionCertificate signs the required client attestation JWT, which Salesforce validates to confirm the requesting first-party app.
The asset token flow instead requires assetTokenAudiences, assetTokenSigningCertificate, and assetTokenValidity together. The asset-token signing certificate has a different purpose from the first-party client attestation certificate.
Include an audience in assetTokenAudiences for each intended consumer of the asset token. Its array requirement still applies even though the exposed element type is a string. For assetTokenSigningCertificate, supply the self-signed certificate's ID rather than its developer name. DER encoding is a documented option for reducing a certificate that exceeds the 4 KB limit.
Custom attribute and custom permission inclusion are independent switches. Both areAttributesIncludedInAssetToken and areCustomPermsIncludedInAssetToken default to false. Defining attributes or associating permissions with the app does not, by itself, include them in an asset token.
Developer defaults and trusted IP ranges
Each customAttributes entry needs both a unique key and a formula. The formula identifies the available existing field that supplies the information, such as User.Country or Organization.Country; the key names the resulting attribute. Field availability matters independently of whether attributes are included in asset tokens. The maximum is 128 entries.
Each trustedIpRanges entry needs both startIpAddress and endIpAddress. Both boundaries are inclusive. These ranges allow access without requiring the user to authenticate with the external client app; they are not OAuth scopes. The maximum is 128 ranges.
Deployment and Retrieval
Components use the .ecaOauth suffix and are stored in the extlClntAppOauthSettings folder. The type inherits fullName from Metadata and supports the * wildcard in a package.xml manifest.
The app definition and its OAuth plugin settings are separate components. Deploying ExternalClientApplication alone is not the same as deploying its ExtlClntAppOauthSettings configuration. A scratch-org deployment report linked omission of this component to an Invalid Plugin Settings error when enabling OAuth.
A combined manifest can list ExternalClientApplication, ExtlClntAppOauthSettings, ExtlClntAppGlobalOauthSettings, and ExtlClntAppOauthConfigurablePolicies as separate types. This does not make all four mandatory in every package. In particular, reports of successful packaged-app references and reports of incomplete OAuth configuration describe different deployment scenarios.
For packaged deployments, distinguish creating a new app in the destination from deploying a reference to an existing packaged app. A reported shared-credential pattern used an app created with Packaged disposition in a persistent Dev Hub, then included exported ExternalClientApplication and ExtlClntAppOauthSettings metadata. That report was limited to Partner Developer scratch orgs.
oauthLink is auto-generated from the org ID and OAuth Consumer ID. A null-link failure can point to incomplete surrounding OAuth configuration; it should not be treated as proof that a scope is missing or that every package must contain global OAuth settings.
Relationships
externalClientApplication connects this OAuth plugin configuration to its app definition. ExtlClntAppGlobalOauthSettings and ExtlClntAppOauthConfigurablePolicies are separate companion metadata components, not fields contained in this type. The attribute and IP-range entries are nested structures within this component.
References
-
ExternalClientApplication:externalClientApplication.
Documentation Inconsistencies
The description of assetTokenValidity mixes duration wording with a timestamp definition: it calls the value a period after issuance but expresses it as seconds from 1970-01-01T0:0:0Z, measured in UTC. It also requires the value to be within 3 minutes of the assertion's expiration time. Do not interpret the field name alone as specifying a simple duration in seconds.
Reported Issues
-
Missing plugin metadata can prevent OAuth enablement. In an April 2025 scratch-org deployment report, omitting
ExtlClntAppOauthSettingsresulted inInvalid Plugin Settingswhen the administrator tried to enable OAuth. This is a reported cause in that scenario, not a universal diagnosis of the error. Scratch-org OAuth enablement report. -
A packaged-app reference can retain source credentials rather than create new credentials in each destination. A July 2026 respondent reported success with an app created using
Packageddisposition in a persistent Dev Hub and exportedExternalClientApplicationandExtlClntAppOauthSettingsmetadata included in the deployment. The respondent said the credentials were inherited from the source app. Testing covered Partner Developer scratch orgs, not Developer Edition orgs. Reported packaged-reference deployment pattern. -
A null
oauthLinkerror can reflect incomplete surrounding OAuth configuration. In a separate attempt described in the July 2026 discussion, omittingExtlClntAppGlobalOauthSettingscaused an OAuth plugin load failure stating thatoauthLinkwas null. This does not make global OAuth settings a requirement for every package; the successful packaged-reference report involved a different scenario. Null-link and credential deployment discussion. -
Managed or namespaced permission sets may fail when assigned to an external client app. In a 2025-2026 discussion involving an installed second-generation managed package, an administrator reported a save failure containing
entity=SetupEntityAccess component=null, state=MANAGED_INSTALLED. A 2026 respondent reported that managed or namespaced permission sets could not be selected successfully, while local permission sets worked. This concerns app access assignment, not theCustomPermissionsscope's informational behavior. Packaged permission set assignment report.
Common Questions
Why can't I access external client app OAuth settings through Metadata API?
The org must enable Allow Access to OAuth Consumer Secrets via Metadata API. Users with developer roles also need View External Client Apps Consumer Secrets in Metadata. Adding OAuth scopes to the app does not satisfy these metadata-access prerequisites.
Can a missing ExtlClntAppOauthSettings component cause Invalid Plugin Settings?
Yes, that was reported when enabling OAuth after an April 2025 scratch-org deployment that omitted this component. The app definition and OAuth plugin configuration are separate components. The report does not establish that omission is the cause of every Invalid Plugin Settings error.
Why are my custom attributes or permissions missing from an asset token?
Defining attributes or associating permissions with the app does not automatically include them in the token. areAttributesIncludedInAssetToken and areCustomPermsIncludedInAssetToken independently control inclusion, and both default to false.
Can I keep the same consumer credentials across scratch orgs?
A July 2026 report described inherited credentials when deploying a reference to an app created with Packaged disposition in a persistent Dev Hub, using exported ExternalClientApplication and ExtlClntAppOauthSettings metadata. The reported success covered Partner Developer scratch orgs; it did not establish equivalent behavior in Developer Edition orgs.
Is assetTokenValidity just a token lifetime in seconds?
Do not assume that from its name. Its definition specifies seconds from 1970-01-01T0:0:0Z in UTC and requires the value to be within 3 minutes of the assertion's expiration time, despite also using duration wording.