We have a managed package that requires a license. We've purchased enough licenses for our entire company (2,500+ users). Assuming I know the SELECT statement that will get me a list of all these users, is there a way I can grant this license to all of these users via either Anonymous Apex or through the Data Loader? Additionally, how can I ensure that all new users who meet this same criteria are granted this license automatically going forward?
Best Answer
Unfortunately there is no API exposed to make writing a tool to do this possible. An idea has been raised for this very use case.
Expose API / Objects for assigning Managed Package Licenses to Users
Read more here.
Where there is a will there is a way...
Well in the spirit of never say never... there is the option of scripting the user interface using something like WebDriver (from the Selenium) world. In theory something like this could be developed to work its way through users that meet certain criteria.