Tuesday, May 18, 2021

How to Find The List of Users Assigned Under Particular Permission Set License

Sometimes it might required you find the list of the users who assigned under the particular permission set license. Please use the below steps to find out the users.

1.Write query on PermissionSetLicense  to get the corresponding id of permission set license name. In my case I want to know the id of the Tableau CRM Plus license.

SELECT Id, DeveloperName, MasterLabel, TotalLicenses, Status FROM PermissionSetLicense



2.Now query on the PermissionSetLicenseAssign object using the id got from the first query.The sample query is below.
       
SELECT Id,AssigneeId ,Assignee.Name,PermissionSetLicenseId, CreatedDate, 
CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp 
FROM PermissionSetLicenseAssign where PermissionSetLicenseId='0PL100000008sUwGAI'

The sample looks like below 




Please comment or write us if you have any queries/requirements.

Please like,follow,bookmark,subscribe this site to receive daily updates.




Hope this helps you..Enjoy..!






3 comments:

  1. this is very useful tip thanks for sharing , but need to know how many custom permissions available in the system , and respective user . can you please share it if possible.

    ReplyDelete
    Replies
    1. You mean custom permissions set or custom permissions

      Delete
    2. Refer this for custom permission
      https://www.srinivas4sfdc.com/2020/01/how-to-access-custom-permission-in-apex.html

      Delete