How to find users with API Enabled Permissions(API Only Users) in Salesforce?

How to find users with API Enabled Permissions(API Only Users) in Salesforce?

“PermissionsApiEnabled” is used to grant API Enabled Permission to the user via Profile or Permission Set. Following SOQLs can be used to find users with API Enabled Permissions(API Only Users) in Salesforce.

Profiles:

SELECT Id, Name
FROM Profile
WHERE PermissionsApiEnabled = true

Users:

SELECT Id, Name 
FROM User 
WHERE ProfileId IN ( 
SELECT Id 
FROM Profile 
WHERE PermissionsApiEnabled = true 
)

Permission Sets:

SELECT AssigneeId, Assignee.Name 
FROM PermissionSetAssignment 
WHERE PermissionSet.PermissionsApiEnabled = true

Leave a Reply