0

I need a help for authorize a Dev Hub Org using the Web-Based Flow. The output of the SFDX Cli is below.

sfdx force:org:display -u myhuborg

Acess Token : 00D000027.....

Alias : myhuborg

Client Id : PlataformCLI

Id : 00D000027.....

Instance Url : https://lemarbysoft-dev-ed.my.salesforce.com

Username : marcosruztreinamento@gmail.com

The Salesforce DX Developer Guide claims that Plataform provides a default connected app by default, and the only thing that we need to do is to run sfdx force:auth:web:login -r instanceUrl but it doesn´t work.

May I create a connected app using the parameters above to authorize and open my Dev Hub Org ?

If Yes, how can I do that ?

Is the PlataformCLI the default connected app ?

The json file output regarding to the authorize command can help me to solve this problem ?

Thank you very much in advance.


Below, I have included the connected app page datail, the SFDX command and the error message. The SFDX command require the "Oauth client secret of personal connected app".

Connected App Page Detail

Sfdx Command

Error Message

1
  • I can see you have already connected to org, thats why you're getting the Access token – Ysr Shk Aug 6 '20 at 1:58
0

Can you share what error you get in authorization as per the Salesforce Guide if you are using your Custom Connected App then command should be

sfdx force:auth:web:login -r https://<yourInstanceURL> --clientid <clientIdforConnectedApp>

After this it will ask for connectedApp secret-key and on entering that it will open the browser having url same as your instance url.

Things to consider here

  1. Your connected app must have checked Enabled for Device Flow.
  2. CallbackUrl it should be https://localhost:< portNumber>/OauthRedirect.You can change the port number but in that case you need to update same in SFDX project

you can check more for sfdx connected-app in salesforce documentation

1
  • Hi, Pmangiani. I have added more information about my question. Coul´d you take a look ? Thanks in advance. – Marcos Ruz Aug 12 '20 at 2:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.