Get external client app metadata from the source org using a retrieve operation.
Verify that the package.xml manifest file in org 1 is configured with the four components of the external client app.
<?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>
Run the retrieve command using the credentials for the source org.
sf project retrieve start --manifest package.xml --target-org
johndoe@example.com
Now that you have the source org data from org 1, there are two options
for deploying external client apps. Either the deployed app references the OAuth
credentials of the source org or it generates a new OAuth global settings file
when it’s deployed.