Overview
The error "invalid_grant" with the description "user hasn't approved this consumer" occurs when the user or the org admin hasn’t granted the necessary authorization for the connected app / OAuth flow Information.
Error Message: "invalid_grant", "user hasn't approved this consumer"
Cause: This error is caused by missing or incorrect user approval settings for the OAuth consumer in the org.
Resolution Steps
-
Identify the Affected Environment:
- Confirm the Org ID where the error is occurring: 00DXXXXXXXXXXXX
-
Check Connected App Permissions / Policies :
- In Setup → Manage Connected Apps → [Your App] → OAuth Policies: check Permitted Users
-
Verify and Update Approval Settings:
-
If it’s set to “All users may self-authorize”, users must individually authorize. If it’s “Admin approved users are pre-authorized”, admin must assign the app to profiles/permission sets.
-
If using Admin approved..., but you haven’t added the user’s profile/permission set under the connected app’s access list → then the user isn’t authorized.
-
-
Test the Configuration:
- Attempt to authenticate using the OAuth consumer
- Confirm that the error no longer appears and authentication is successful
Note: If the issue persists after verifying the settings, consider reaching out to support for further assistance.
Frequently Asked Questions
- How do I know if this error applies to my situation?
- You will see the error message "invalid_grant" with the description "user hasn't approved this consumer" when attempting to authenticate using OAuth in your environment.
- What should I do if the error persists after checking the settings?
- Ensure that all necessary Connected App Permissions / Policies are correctly configured. If the error continues, contact support with details of your OAuth configuration for further investigation.
- Can this error affect multiple users or environments?
- Yes, if the OAuth consumer is used across multiple environments or by multiple users, incorrect approval settings can lead to widespread authentication issues.
Matej Storga
Comments