Deploy the External Client App OAuth Plugin

After configuring the OAuth settings file and the global OAuth settings file, deploy the changes to update the external client app.

When deploying or making changes to an external client app, you must retrieve, update, and deploy the data completely. The metadata API does not support partial updates.

  1. Configure the package.xml manifest file in the project directory to reference these types.
    • ExtlClntAppOauthSettings
    • ExtlClntAppGlobalOauthSettings
    • ExtlClntAppOauthConfigurablePolicies
    The package.xml file should look like this.
    <?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>
  2. Run this command.
    sf project deploy start --manifest package.xml --target-org johndoe@example.com
    When the OAuth settings and global settings files are deployed, a new OAuth consumer is created. Fields like consumerKey and consumerSecret are generated. To verify that the external client app settings and global settings deployed successfully, check that the auto-generated options were created.
  3. Use this retrieve command to see the deployed package.xml file.
    sf project retrieve start --manifest package.xml --target-org johndoe@example.com