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
Prajapati.LakhanPrajapati.Lakhan 

Package license assignment using apex

Hi,

 

After installing a managed package from AppExchange, we can assign the package licenses using manage licenses link. Is there any way either using APEX or any API (enterprise/partner/metadata) to retrieve the information about managed package license assignment for an org.

 

 

 

Best Regards,

Lakhan Prajapati

Anup JadhavAnup Jadhav

I don't believe you can access the installed appexchange package licence via API or Apex.

 

- Anup

Heather ThompsonHeather Thompson
PackageLicense pl = [SELECT Id FROM PackageLicense WHERE NamespacePrefix = 'Test'];
User u = [select id from user where firstname = 'Test'];
insert new UserPackageLicense(UserId = u.id, PackageLicenseId = pl.id);
devil lyndadevil lynda
Hello Friends
I am Lary Lynda (https://flyerzones.com/sobeys-flyer/)
I need apex licence code anyone Can give me??
venkat,pattapuvenkat,pattapu
Thanks Heather,Your piece of code worked

--Venkat