I am setting up SF-DX using trial Dev Hub enabled Org and completed below steps:

  1. Set up Force.com IDE2 and Salesforce CLI.
  2. Added SFDX project.

But when i am trying to Authorize my Dev Hub, it authorizes SF org credentials and then redirects to http://localhost:1717/OauthRedirect?code=xxxx&state=xxx

I googled and found that we need to add connected app so i have also:

  1. Added connected app with callback URL http://localhost:1717/

I am not able to understand how this URL will be resolved as, what do I need to to resolve this URL or am I missing on some set up steps.

I am using Windows 7.



4 Answers 4


You don't "need" the Connected App ordinarily, as it usually uses the Global Connected App that Salesforce uses by default. If you're having problems, all the usual software needs to be checked. Your firewall should allow access to localhost:1717, your computer should have a free port at 1717 (meaning, only one copy of the command line should be running at once), you should update your command line to the latest version via sfdx update, or as a final resort, try reinstalling the command line. You might also need the assistance of IT if your firewall, antivirus, or some other configuration is blocking access to localhost.

  • my localhost is up with port with IIS.. my question is how this URL will be resolved i need technical explanation on this.. how my system will recognized this location .. by location i don't only mean localhost but also localhost/OauthRedirect?code=xxxx&state=xxx.. is this handled in salesforce cli Feb 15, 2018 at 14:02
  • 2
    @sfdeveloper Yes, the CLI sets up an HTTP server on port 1717 (by default, but you can change this), and waits for the callback from the OAuth login.
    – sfdcfox
    Feb 15, 2018 at 15:22

Try changing the port in your address bar to from 1717 to 7717. I can't speak to why this happens but it is the solution I have found works.

  • 1
    WOW ... thank you so much for sharing this! This has been driving me INSANE. I'm still not sure where this issue came from but for me it started in early 2022 and has happened both with actual SFDC sandboxes instances as well as Playground/Dev instances. FWIW none of the other suggestions helped me. I tried updating VS Code extensions, using MS Edge, fussing with oauthLocalPort in sfdx-project.json, disabling AV and/or Firewall - none of these made a difference. My setup for reference: Win 10 x64, VS Code 1.64.2, Node 14.16.0, SFDX 7.137.1 Feb 14, 2022 at 15:15

I was facing the same issue, but then I tried below and got solved.

  1. Go to -> sfdx-project.json file in your vs code
  2. Add "oauthLocalPort" : 1717

This worked for me just now.

enter image description here


I was facing this issue because of my company VPN. On other environment like on personal PC I never got this issue. This similar issue I was facing with VS Code. The cause of issue might be different for others but for me it was because of VPN. You can connect to your IT support team and get the proper VPM setting that can be added in windows environment variable and might require a restart of your computer.


You must log in to answer this question.

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