Invalid_Grant Authentication Failure Salesforce Exception

Invalid_Grant Authentication Failure Salesforce Exception

Invalid_Grant Authentication Failure Salesforce Exception occurs when the user hits any login limit or error. For example, Login Rate Exceeded exception.

Exception:

{
    "error": "invalid_grant",
    "error_description": "authentication failure"
}

Resolution:

1. To find the exact root cause, please check the login history. It will give the exact error message.

Note: If you are using username-password OAuth flow and if the credentials are incorrect, it won’t generate Login History.

2. If you are using Username-Password OAuth Flow, enable “Allow OAuth Username-Password Flows”.

3. Verify whether the username, password, consumer key, consumer secret, etc. are accurate.

4. Login as the Integration user using the username and password. Go to My Settings and check whether Reset my Security Token option is available. If it is available, reset the security token and use it along with the regular password in the password parameter.

Leave a Reply