Loading

Salesforce Connected App: 'Failed: Not Approved for Access' Error When Logging In via API

Publiceringsdatum: Jun 10, 2026
Beskrivning

The "Failed: Not approved for access" error appears in the Login History when an API user attempts to authenticate through a Salesforce Connected App but is not authorized to access it. This error typically occurs when the Connected App's OAuth policy is set to "Admin approved users are pre-authorized" and the user has not been granted access through a Profile or Permission Set.

Lösning

Root Cause

Navigate to the Connected App Detail: Setup > Manage Apps > Connected Apps. Select the relevant Connected App. Under the OAuth Policies section, Permitted Users is most likely set to "Admin approved users are pre-authorized". This setting requires explicit authorization for each user or profile before they can authenticate.

Option 1: Grant Access to Specific Users or Groups

To allow access for a specific group of users:

  • Use Manage Profiles and the Profiles related list to authorize access to the appropriate Salesforce profiles and their associated users.
  • Alternatively, use Permission Sets and the Permission Sets related list to authorize access at a more granular, individual user level.

Option 2: Grant Access to All Users

To allow access to this Connected App for all users in the org:

  • Under the OAuth Policies section, change Permitted Users to "All users may self-authorize".
Knowledge-artikelnummer

000386708

 
Laddar
Salesforce Help | Article