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 Name, Id FROM User WHERE Id IN (SELECT AssigneeId FROM PermissionSetLicenseAssign WHERE PermissionSetLicense.MasterLabel ='Sales Console User') AND IsActive=true ORDER BY Name
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.