Auth0 Home Blog Docs

Salesforce API Addon error



I’m getting an error on Salesforce API (Addon): https://{{auth0_domain}}/delegation

  "error": "invalid_grant",
  "error_description": "user hasn't approved this consumer",
  "statusCode": 400

I authorized Salesforce connected app that has the Auth0 digital certificates and everything seems to be fine in Salesforce Side


To my knowledge, the error in question comes from Salesforce directly so the issue might be caused by a mismatch in configuration or the user having not yet consented to the use of that application.

Based on the available documentation if you configured your app in Salesforce with Admin approved users are pre-authorized then make sure the user in question is authorized for that application; if you chose All users may self-authorize then the user should manually authorize the app before trying to obtain a token through Auth0 delegation.

In addition, Salesforce maintains separate OAuth related endpoints depending on the environment so ensure that you activated the expected addon, Salesforce vs Salesforce (Sandbox), depending on your situation.

Another thing that might be relevant is if the user in question is associated with the notion of Salesforce Communities so update your question with this information if appropriate.