Loading

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

Julkaisupäivä: Mar 2, 2024
Ratkaisu

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
Knowledge-artikkelin numero

001121341

 
Ladataan
Salesforce Help | Article