Skip to main content
Rc Ex が「#OAuth」で質問

Hello Salesforce Developers, 

 

I am using a Salesforce Developer Edition org and trying to authenticate Salesforce CLI using JWT Bearer Flow. 

 

I created an External Client App with JWT Bearer Flow enabled and uploaded my certificate. 

 

When I run the Salesforce CLI JWT authentication command, I receive this error: 

 

"External client app is not installed in this org" 

 

The External Client App exists in the same org, and the App Status shows Enabled. 

 

Org type: Developer Edition 

 

Username: 

rce23027@resourceful-panda-pvpcnl.com

 

 

My goal is to use Salesforce CLI for creating and managing a 2GP Managed Package. 

 

Could you please advise how to install/approve the External Client App or correctly configure JWT authentication? 

 

Thank you. 

 

#OAuth  #Salesforce Developer  #Salesforce CLI  #Developers Edition

1 件の回答
  1. 10月7日 23:22

    Hi, That message means the token request did not land on an org where this consumer is installed. Enabled on the app record is not the same thing. Check Distribution State in External Client App Manager. For a login in this same Developer Edition, it needs to be Local. A Packaged app is not usable for OAuth in the org where you created it, even when the status says Enabled. Flipping it back to Local often does not re-register the consumer. Create a new app and leave it Local from the start. The other usual cause is the CLI audience. login.salesforce.com is not a valid JWT audience anymore, and the CLI reports that as "not installed". Pass --instance-url with this org's My Domain URL from Setup, not https://login.salesforce.com. On the app, open Policies and set permitted users to Admin approved users are pre-authorized, then add the profile of the user you pass as --username. On Settings, keep JWT Bearer Flow on, with your certificate, and include the api and refresh_token scopes. Copy the consumer key again after you save, and wait a few minutes before you retry. For the 2GP work, enable Dev Hub in this org and log in as a user in that Dev Hub. The app has to live in the same org as that username.

0/9000