5

I'm working on creating a Custom Permission within a new Permission Set in a beta managed package.

My Custom Permission:

<?xml version="1.0" encoding="UTF-8"?>
<CustomPermission xmlns="http://soap.sforce.com/2006/04/metadata">
   <label>Bar</label>
</CustomPermission>

My Permission Set:

<?xml version="1.0" encoding="UTF-8"?>
<PermissionSet xmlns="http://soap.sforce.com/2006/04/metadata">
    <label>Foo</label>
    <userLicense>Salesforce</userLicense>
    <customPermissions>
        <enabled>true</enabled>
        <name>Bar</name>
    </customPermissions>
</PermissionSet>

When I install the managed package for all users, the Custom Permission is automatically assign to all profiles.

Is it possible to not assign it by default in order to use my Permission Set manually instead?

1 Answer 1

5

When you install a package, the actions that occur are as outlined in Installing Packages. In other words, if the system administrator chooses to install for all users, all profiles get all the permissions; you cannot override this behavior. Instead, choose Install for Admins or Install for Specific Profiles, then you can assign the permission set to users after installation.

2
  • Reviving an old question as we recently ran into this issue. Now in 2023, is there anywhere in the UI to actually see all of the Permissions a SysAdmin has been granted, including those granted via a deployed package?
    – kennyc
    Aug 25, 2023 at 15:35
  • 1
    @kennyc No, there isn't. However, you might find that The Permissioner may do what you're looking for. I haven't personally used it, but it looks decent. Try it out in a Sandbox first. I'd love to hear about it (not my product, just curious).
    – sfdcfox
    Aug 25, 2023 at 16:56

You must log in to answer this question.

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