We have limited number of permission set licences and don't want to buy new licences. So i wanted pulled all the users using that permission set licence using soql query.

(SELECT AssigneeId FROM PermissionSetLicenseAssign WHERE PermissionSetLicense.MasterLabel ='Sales Console User') AND 

But lets say out of all the assigned users to this permission set only some of them has been actually using it. So i want to see who is actually using assigned licences. So that i can remove licences from those users who are not actually using it; and then assign those license to users who would use them.

As per my research and knowledge its not possible but want community experts to confirm.


1 Answer 1


In theory, Event Monitoring could help you, but you'd have to enable it, set up the logs, and wait a while, plus figure out how to parse the data. Basically, Event Monitoring can allow you to see which resources users are using.

If I were in a situation where I needed to do something like this, I'd probably create some sort of page that users could use to request permission to a license, which would enable the user to do so, and then automatically disable the license after a period of time, like 30 days or so. Users that are still using the feature would have to re-enable it every thirty days, and those that stop using it would eventually have their licenses revoked.

Other than that, I don't have a long-term solution that would work besides Event Monitoring, and it would take some effort to set up this feature and build the automation you'd want to have to keep your data current. And, of course, make sure you're removing this license from deactivated users so they don't continue to count towards your limit; we currently have a trigger that removes all feature licenses and permission sets upon deactivation to keep our license count down.

  • one question: If a user was using a permission licence.....upon deactivation of that user; isn't that permission license freed. If not how can i make free that license. May 20, 2018 at 5:24
  • @Dnyaneshwar No, it's automatically freed, but you can delete the related PermissionSetLicenseAssign to remove access.
    – sfdcfox
    May 20, 2018 at 6:17
  • Also If i want to track Permission set licence under Event Monitoring....what type of event would that be? May 20, 2018 at 6:21
  • @Dnyaneshwar I have no idea; I presume you could parse the records to see who's using which feature. If I were me, though, I'd just make users deactivate after 30 days and force them to click a button to enable access.
    – sfdcfox
    May 20, 2018 at 6:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .