+ 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