Skip to main content Unisciti a noi al TDX, a San Francisco o su Salesforce+, il 5-6 marzo per la conferenza degli sviluppatori sull'era degli Agenti IA. Registrati ora.
I'm getting an error on sfdx cli authorize an org.  I'm experiencing the error on two different Salesforce orgs on two, accessed by two different laptops (my corporate laptop and personal laptop used for freelancing), and on two different networks (my corporate VPN and home network).

The error is:

We can't authorize you because of an OAuth error. For more information, contact your Salesforce administrator.

OAUTH_APPROVAL_ERROR_GENERIC : An unexpected error has occured during authentication. Please try again.

I've tried setting "relaxing ip restrictions" on the Salesforce CLI app, and tried running the sfdx authorize command with the scope in the url:

sfdx force:auth:web:login -r https://login.salesforce.com/services/oauth2/authorize?prompt=login&scope=full

Nothing is working and the OAuth hangs until I hit refresh and then get the above error.  I've tried in Firefox and Chrome browsers and after deleting cache.

Anyone know of a solution?  Thanks
3 risposte
  1. 27 feb 2021, 05:59
    Hi Randall,

    Was this working earlier? Has there been any update to SFDX recently?

    Can you try sfdx auth:web:login instead of sfdx force:auth:web:login 

    Thanks
  2. 10 mar 2021, 02:47
    Hi Randall,

    I also faced the same issue after I update CLI but I rollback to the old version and now it is working fine.

    you should also rollback to the old version of CLI.

    Thanks.
0/9000