Package an External Client App

Determine whether to package and distribute your external client app or keep it local. Only packaged apps can be deployed to other orgs. You can package external client apps with first-generation or second-generation managed packages. Apps that use OAuth can be deployed with their own OAuth settings or they can reference settings on the org where the app was developed.

The only difference in configuration between a local and a packaged external client app is the Distribution State setting. If you change the value in this field from Local to Packaged, the app can be added to a managed package.

When packaging an external client app, it’s important to know that each app contains multiple files. Like the policies and settings tabs in the External Client App Manager, the configurations that define the app are divided between policies and settings files. For added security, sensitive information isn’t packaged but remains secure on the org where it was developed. This org is the source org. If the org that downloads the app can’t associate with the source org, a new global settings file can be generated. The new file is created when the app is deployed.

Note
Note If you delete the external client app from the source org, the subscriber org’s external client app breaks. The subscriber org depends on information in the global OAuth settings on the source org. Removal of the external client app causes the OAuth flow to fail in the subscriber org.

We recommend that you use second-generation managed packages along with a Dev Hub org to create packageable apps. The process for packaging an external client app is no different than creating any other 2GP managed package. To create a 2GP managed package containing your external client app, you must use a Salesforce DX project. See Configure a Salesforce DX Project for External Client Apps.

You can also package external client apps with first-generation managed packages. See Package an External Client App with First-Generation Managed Packages.