It is easy to overlook the importance of reconciling permissions or permission sets in our Salesforce environment. However, it is crucial to ensure that we can audit our environment and retrieve the required information quickly.

To capture the permission sets associated with a given user or profile via the Permission Set Assignment object, you can create the following SOQL query using Workbench, developer console, or dataloader:

SELECT Id, PermissionSetId, PermissionSet.Name, PermissionSet.ProfileId, PermissionSet.Profile.Name, AssigneeId, Assignee.Name 
FROM PermissionSetAssignment 
WHERE Assignee.Name = 'Joe Soap'

Remember to update the Assignee name as required.

Alternatively, to retrieve all users associated with a specific permission set, you can use the following SOQL query:

SELECT Id, PermissionSetId, PermissionSet.Name, PermissionSet.ProfileId, PermissionSet.Profile.Name, AssigneeId, Assignee.Name 
FROM PermissionSetAssignment 
WHERE PermissionSet.Name = 'My Permission set'

As I start my auditing series, please let me know if you have any specific questions.

May the Force be with you!

Jay Slinger

Recent Comments

No comments to show.