You are here:
Deploy an External Client App with a New Global OAuth Settings File
Deploy the source org’s metadata on an org with its own OAuth consumer. To configure the app, remove the OAuth link in the OAuth settings file and add a reference to the global OAuth settings file in the package.xml manifest file on the new org.
- Open the package.xml manifest file on org 3 and make sure that it includes the
ExtlClntAppGlobalOauthSettings type.
<?xml version="1.0" encoding="UTF-8"?> <Package xmlns="http://soap.sforce.com/2006/04/metadata"> <types> <members>*</members> <name>ExternalClientApplication</name> </types> <types> <members>*</members> <name>ExtlClntAppOauthSettings</name> </types> <types> <members>*</members> <name>ExtlClntAppGlobalOauthSettings</name> </types> <types> <members>*</members> <name>ExtlClntAppOauthConfigurablePolicies</name> </types> <version>58.0</version> </Package> - Remove the OAuth link field from the OAuth settings file.Deployment fails if there’s an OAuth link field in the settings file with incorrect information. If the field doesn’t exist, it’s generated during deployment. Best practice is to remove the OAuth link field before deployment.
- Deploy the changes to org 3.
sf project deploy start --manifest package.xml --target-org johndoe@example3.com - Verify that the deployment succeeds. You see all four files in the external
client app.
- Header file
- Global OAuth settings file
- OAuth settings file
- Policies file
- Verify that the settings file includes the generated OAuth link field and that the global settings file includes an OAuth consumer key and secret.
- Initiate the Authorize Endpoint for the Deployed External Client App with a Global Settings File
After the new org metadata is configured with its own global OAuth settings file, initiate an OAuth flow to acquire an access token.

