0

I am trying to authorize an scratch org via CLI (sfdx force:auth:web:login) with my user which is created by another user and I am not able to authorize it. Getting below error:

ERROR running force:auth:web:login:  This org appears to have a problem with its OAuth configuration. Reason: invalid_grant - invalid authorization code 
username: <Not Specified>, 
clientId: PlatformCLI, 
loginUrl: https://login.salesforce.com, 
privateKey: <Not Specified>
Try this:
Verify the OAuth configuration for this org. For JWT:
Ensure the private key is correct and the cert associated with the connected app has not expired.
Ensure the following OAuth scopes are configured [api, refresh_token, offline_access].
Ensure the username is assigned to a profile or perm set associated with the connected app.

How can I resolve it? Please help on this.

  • What's your Salesforce user profile or licence – Raul May 15 at 10:21
  • Its system admin only. – Ananga May 15 at 10:24
  • How about trying to execute the first command in this answer? – TSmith May 15 at 10:32
  • The salesforce cli connected app is not available in the scratch org. – Ananga May 15 at 10:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.