Loading

SFDC Connector with OAuth JWT connection "user hasn't approved this consumer"

Date de publication: Mar 2, 2024
Résolution

SYMPTOM

Mule 4 application using Salesforce connector 10.x configured with OAuth JWT gives the following error on test connection.
org.mule.runtime.api.connection.ConnectionException: Invalid status code: 400, response body: {"error":"invalid_grant","error_description":"user hasn't approved this consumer"}
  org.mule.runtime.api.connection.ConnectionException: Invalid status code: 400, response body: {"error":"invalid_grant","error_description":"user hasn't approved this consumer"}
  Caused by: Invalid status code: 400, response body: {"error":"invalid_grant","error_description":"user hasn't approved this consumer"}

CAUSE

The error is due to the incorrect permissions for the user profile in Salesforce.

SOLUTION

  • Log in to your Salesforce Instance
  • Go to Settings > Manage Users > Profiles 
  • Edit the profile associated with the user configured in the connector.
  • For 'Connected App Access' under the profile, select the Connected App
      User-added image

     User-added image
Numéro d’article de la base de connaissances

001121341

 
Chargement
Salesforce Help | Article