I'm trying to sign into a sandbox org, but I'm getting an error when running through the OAuth flow:

We can't authorize you because of an OAuth error. 
For more information, contact your Salesforce administrator.
1800 : There was a problem in setting up your remote access

I've tried logging in through the CLI (Using command sfdx force:auth:web:login -r https://test.salesforce.com), MavensMate (selecting Sandbox), and VS Code. All give me the same error. Workbench seems to sign in just fine. Has anyone else had this error?

  • 3
    What does your Login History say about this, if anything? Any errors there? Do you get any additional responses (typically in JSON format) that we can look at? – sfdcfox Mar 18 '19 at 15:56
  • Looks like when I tried to log in through the CLI, login history shows Status "Success" with HTTP Method "Unknown." The only error it gives me is the one posted above (see image), and the CLI is hung on the login command as if it's still waiting for me to log in. – Dylan Bowman Mar 18 '19 at 16:48
  • Are you sure you have the correct permissions? This question suggests it may be a permission issue. Also, I've read that resetting your password may help (why? I don't know, but that's what was said.) Try it out and let us know if either solution helps. – sfdcfox Mar 18 '19 at 16:55
  • I've reset the password and it didn't work, and I have a permission set attached to my user with Modify All Data, Author Apex, API Enabled, Manage Connected Apps, and Modify Metadata all enabled, which didn't work either. – Dylan Bowman Mar 18 '19 at 17:04
  • I created a brand new Developer Sandbox and it works. This issue seems to only happen after a refresh. – Dylan Bowman Mar 18 '19 at 17:16

Mavens remembers old sandbox somehow, I had this problem before and had to edit the config file of the org each time it refreshed. I had posted the question and answer in MM github but I can't find it now but basically.

In the config folder in the .settings file there is a line for "instanceUrl". Update that and then save and it will work for you.

  • would this cause the issue of logging in directly through the SFDX CLI, being it's not using MavensMate? – Dylan Bowman Mar 18 '19 at 22:35
  • Do you still have mm plug-in installed? It might still be trying to connect through it. – Dan Wooding Mar 18 '19 at 22:47
  • Uninstalled MavensMate and had the same issue running the command above. – Dylan Bowman Mar 22 '19 at 23:34

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.