I am struggling with this since morning. Someone from my team has created a scratch org and has added me as a Sys Admin. How do I connect to it via VsCode? I tried sfdx force:config:set defaultusername= *my username" However, I am getting "No org configuration found for name" I tried authenticating the dev hub, a number of times.

Please help.

1 Answer 1


You need to authenticate to the scratch org itself, rather than the Dev Hub, but the command is the same:

sfdx force:auth:web:login -a <desired alias> --instanceurl <instance url>

See the command reference. When SFDX opens the browser for you, just log in with the created credentials, and the org will be added to your SFDX keychain and org list. If you want the org to be your default, add -s.

  • Hey, so i tried with this, and I get Unexpected arguments: --instance-url. Tried the actual instance url of the scratch org and test.salesforce.com both.
    – KLab
    Commented Jul 22, 2019 at 11:37
  • Did you include https:// in the instance-url parameter, as shown in the example at the provided link? Commented Jul 22, 2019 at 11:43
  • 1
    My bad, there was a typo. the command had instance-url, instead of instanceUrl.
    – KLab
    Commented Jul 22, 2019 at 11:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .