Permissions

How to fix the "API is disabled for this user" error in Salesforce

4 min read · Updated on

Written by Séton Estumento, independent Salesforce consultant, Business Analyst and administrator

This error appears when a tool connects to Salesforce through an API using a user's account. Check the API Enabled user permission first: according to Salesforce Help, it lets a user access any Salesforce API. The cleanest fix is to turn it on in a permission set and assign that set to the affected user.

What the message means

A connector, a third-party app or a script calls Salesforce through its API. It acts on behalf of a user. If "API is disabled for this user" keeps coming back, that user's API Enabled permission is the first thing to check.

This guide covers that permission only. Other causes exist (credentials, login restrictions, edition). They are not covered here.

Where the permission comes from

A user has one profile. Depending on the Salesforce edition, they can have several permission sets. Permissions add up: if the profile does not grant it but a permission set does, the user has it.

To see where the permission comes from (or does not), look at the profile and at every assigned permission set.

Access · North region accountsFictitious data
KB
Karim B.Sales · North region
  • Permission set "North Region Sales"
  • Read access to accounts in the region
  • Edit access to their opportunities
  • Tested with the user

Access granted and checked

Demo screenshot, fictitious data: a fictitious screen assigning access to a user: a base profile and added permission sets

Steps to fix it

1. Identify the real user

Note the user whose credentials the tool uses. In Setup, type Users in Quick Find and open their record. Check their profile and the Permission Set Assignments related list.

2. Decide where to grant the permission

SituationSuggested action
Standard profileUser permissions cannot be edited there: use a permission set
Custom profile shared by many usersAvoid opening the API to everyone: prefer a set assigned to a few people
"Minimum Access" profileIt gives the minimum: access is added through permission sets

3. Create the permission set

  1. In Setup, type Permission Sets in Quick Find, then select Permission Sets.
  2. Click New.
  3. Enter the name and description. If users have different licences, choose None for the licence.
  4. Turn on the API Enabled user permission.
  5. Check the result with View Summary, which lists the enabled permissions.

4. Assign the permission set

From the user's record:

  1. In the Permission Set Assignments related list, click Edit Assignments.
  2. Under Available Permission Sets, select the set and click Add.
  3. Click Save.

From the permission set: Manage Assignments, then Add Assignments, tick the users, Next, then Assign. You need the Assign Permission Sets permission.

Integration, system, guest and Self-Service users do not appear in Manage Assignments. For them, assignment goes through the PermissionSetAssignment API object. This is a technical-profile case.

5. Test

Run the tool's connection again. If the error persists, review the user's permissions: another set or another setting may be involved.

Common mistakes

  • Looking for the permission in a standard profile, where it cannot be edited.
  • Giving API Enabled to a whole profile when only one person needs it.
  • Testing with your own administrator account when the tool uses another account.
  • Forgetting to assign the set after creating it.
  • Ticking other permissions "just in case". Grant only what is needed.

When to ask for help

If the user is an integration account, if several tools fail or if you are unsure which permissions to open, an access review avoids opening too much. See the Profiles and permissions service. To understand how profiles and sets work together, read the guide to permission sets. For an error in a Flow, see fixing a Flow error.

Official references

Frequently asked questions

The "API Enabled" user permission. According to Salesforce Help, users who have it can access any Salesforce API.

No. Object and user permissions cannot be changed in standard profiles. Use a permission set instead.

Salesforce does not list integration, system, guest and Self-Service users there. For them, assignment goes through the PermissionSetAssignment API object.

A problem with your Salesforce?

Describe it in a few lines. Reply within one working day, free quote.

Describe my problem