Can we just add permission set to a user during the installation of the package, I Mean if the user is system admin then assign Admin Permission set and for remaining Users assign user permission Set. During the Installation Process

Is it possible to add?

If No what're the alternative solutions. Permission Set needed to be assigned for the usage of Application

1 Answer 1


You can create a class which implements InstallHandler interface and write your logic in onInstall method this method will be invoked after package installation.

global class PostInstallClass implements InstallHandler {
  global void onInstall(InstallContext context) {
        //Your logic to add permission sets.

For more information you can refer salesforce documentation

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .