function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ra811.3921220580267847E12ra811.3921220580267847E12 

How to get List of licensed user details for managed packages in salesforce

Hi,

how to get list of licensed user details for managed packages into vf page
Vinita_SFDCVinita_SFDC
Hi,

I understand that you wish to get User details with license type in VF page. You can query it in VF controller and show it on VF page:

List<User> usersWithSalesforceLicense = [
    Select Id, Name, Profile.UserLicense.Name
    From User
    Where Profile.UserLicense.Name = 'Salesforce'
];

SELECT Id,UserLicenseId FROM Profile where UserLicenseId  in (SELECT Id FROM UserLicense where name ='Salesforce')