Skip to content

Search User with Assigned PermissionSet Licenses

Introduction

For a Salesforce admin, it’s day-to-day work to create new users and assign PermissionSet Licenses to the users. In a big organization with lots of users, it’s exhausting to do all the admin stuff if we are not aware of some shortcuts in day-to-day life.

Business Use Case

Sara received a requirement to create a User with Salesforce Map Permission set. As all the licenses are occupied, it’s tedious to find the users assigned to the permission set licenses to get it released for the new user if possible.

We will write down a query to help Sara to find out the users who all are inactive and occupying the Permission Set Licenses.

Perform the following steps to solve the above business requirement

Step 1: Login to your Salesforce Org.

Step 2: Click on the Gear icon | Developer Console.

Step 3: Write down the below query in the developer console and execute it.

SELECT PermissionSetLicense.MasterLabel, Assignee.isactive, PermissionSetLicenseAssign.AssigneeId, Assignee.Name FROM PermissionSetLicenseAssign WHERE PermissionSetLicense.developername = ‘SFMaps_Maps_Core’ AND Assignee.isactive = true  {this condition is optional if you want to find only active users.}  

Here you will find a list of all active users assigned to Salesforce Maps Permission set Licenses. You can remove Assignee.Isactive = true condition from the query to get a list of all users and change the condition Assignee.Isactive = False to get a list of all InActive users.

You are done!

I want to hear from you! What did you learn from this post? Share your tips in the comments!  


2 thoughts on “Search User with Assigned PermissionSet Licenses”

Leave a Reply

%d bloggers like this: