Failed to authorize org.

Issue #2622 open
Michał Głowacz created an issue

I cannot connect to salesforce sandboxes.

When I tried created new connection then this error appear:

“Failed to authorize org. Status: 1 Name: AuthCodeUsernameRetrievalError Message: Could not retrieve the username after successful auth code exchange. Due to: request to https://abb-ability--dev.sandbox.my.salesforce.com/services/oauth2/userinfo failed, reason: unable to get local issuer certificate.”

I updated to new version CLI:

@salesforce/cli/2.55.6 win32-x64 node-v20.16.0

Comments (1)

  1. Scott Wells repo owner
    • changed status to open

    Hi. This is still almost certainly a CLI issue as all that IC2 is doing is running sf org login web -a <alias> [-r <loginUrl>], and that error is being issued by the CLI command, not IC2. You should be able to reproduce it directly from the command-line in isolation of IC2.

    Assuming that's the case, I'd recommend that you perform a 100% clean uninstall/reinstall of the CLI as doing so frequently resolves strange issues like this.

    Make sure that you perform all uninstall steps documented here:

    https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_uninstall.htm

    up to but not including those under Remove Authorization and Log Files as that step will remove your existing org authorizations, scratch orgs, etc.

    If the problem still exists after that and is still reproducible from the command-line directly, you should log a bug in the Salesforce CLI public issue tracker:

    https://github.com/forcedotcom/cli/issues

  2. Log in to comment