Sub topic 8
Granting access with permission sets
This chapter assumes you can navigate Setup, know the difference between profiles and permission sets, and have already installed a package into a sandbox with the Admins Only option. Here you grant access to that package on purpose, starting from the smallest set of permissions.
Why permission sets fit installed apps
A profile is a user's base access, and each user has exactly one. A permission set is an add-on bundle of permissions that you can assign to many users. Most AppExchange publishers ship their access as permission sets, so you can grant the app to a few people without changing anyone's profile.
This approach has three advantages:
- You can grant access to one user, test it, and then widen it.
- You can remove access by unassigning the permission set, and the user's profile stays untouched.
- The permission set shows what the app needs, which helps you review its requested access.
What a package's permission sets contain
Open Setup > Permission Sets and look for the sets that came with the package. For each one, check:
- Object permissions (read, create, edit, delete, view all, modify all) for both the app's objects and your standard objects.
- Field permissions on any of your fields the app reads or writes.
- Apex class and Visualforce page access.
- System permissions such as View All Data, Modify All Data, or API Enabled.
- Custom permissions the app uses to switch features on or off.
Compare these with the access you recorded when you reviewed the listing. If a set grants Modify All Data to ordinary users, ask the publisher why before you assign it.
Permission sets from a managed package are locked. You can't edit them, and the publisher may change them in an upgrade. If you need different access, create your own permission set and add only the extra permissions. Assign both sets to the user.
Assign to one test user first
The sandbox trial should start with a single user who has a normal profile, not a system administrator. An admin can see almost everything anyway, so testing as an admin hides missing permissions.
sf org assign permset --name Example_App_User --target-org my-sandbox --on-behalf-of [email protected]Replace Example_App_User with the real API name from Setup. Then sign in as the test user, or use Login As, and run the app's main scenarios. Note every error such as "insufficient privileges" or "You don't have access to this tab". Each one points to a permission you either need to add or should deliberately leave out.
Placeholder removed below.
Granting access with permission sets
This chapter assumes you can navigate Setup, know the difference between profiles and permission sets, and have already installed a package into a sandbox with the Admins Only option. Here you grant access to that package on purpose, starting from the smallest set of permissions.
Why permission sets fit installed apps
A profile is a user's base access, and each user has exactly one. A permission set is an add-on bundle of permissions that you can assign to many users. Most AppExchange publishers ship their access as permission sets, so you can grant the app to a few people without changing anyone's profile.
This approach has three advantages:
- You can grant access to one user, test it, and then widen it.
- You can remove access by unassigning the permission set, and the user's profile stays untouched.
- The permission set shows what the app needs, which helps you review its requested access.
What a package's permission sets contain
Open Setup > Permission Sets and look for the sets that came with the package. For each one, check:
- Object permissions (read, create, edit, delete, view all, modify all) for the app's objects and for your standard objects.
- Field permissions on any of your fields the app reads or writes.
- Apex class and Visualforce page access.
- System permissions such as View All Data, Modify All Data, or API Enabled.
- Custom permissions the app uses to switch features on or off.
Compare these with the access you recorded when you reviewed the listing. If a set grants Modify All Data to ordinary users, ask the publisher why before you assign it.
Permission sets from a managed package are locked. You can't edit them, and the publisher may change them in an upgrade. If you need different access, create your own permission set and add only the extra permissions. Assign both sets to the user.
Assign to one test user first
Start the sandbox trial with a single user who has a normal profile, not a system administrator. An admin can see almost everything anyway, so testing as an admin hides missing permissions.
sf org assign permset --name Example_App_User --target-org my-sandbox --on-behalf-of [email protected]Replace Example_App_User with the real API name from Setup. Then sign in as the test user, or use Login As, and run the app's main scenarios. Note every error such as "insufficient privileges" or "You don't have access to this tab". Each one points to a permission you either need to add or should deliberately leave out.
Licenses and other blockers
A permission set assignment can fail or have no effect for reasons that are not about permissions:
- Package license. For a managed package with licensing, the user needs a license seat. Assign it under Setup > Installed Packages > Manage Licenses, then assign the permission set.
- Permission set license. Some sets require a permission set license, which you must assign first.
- User license mismatch. A set can only include permissions that the user's license allows.
- Missing field access. Object access without field-level security leaves fields hidden or empty on page layouts.
Scale up with groups
Once the test passes, assign the permission set to a pilot team and watch for issues. If an app needs several sets, bundle them in a permission set group so you manage one assignment per user. Assign by role, not by individual wherever you can. Keep a short record of who has the app and why, because you will need it during later reviews.
Check what you granted
Open the permission set and use Assigned Users to confirm who holds it. To see the effect for a single user, open the user record and review Permission Set Assignments. Also run sf package installed list --target-org my-sandbox to confirm you are testing the package version you intended.
Common mistakes
| Mistake | Result | Fix |
|---|---|---|
| Testing only as an administrator | Gaps in access go unnoticed until users report them | Test as a user with a typical profile |
| Editing profiles instead of using permission sets | Access is hard to audit and reverse | Grant through permission sets |
| Skipping the package license | The user sees no app or gets a license error | Assign the license, then the set |
| Assigning every set the package ships | Users get features and data they don't need | Assign only the sets the role requires |
Exercise
A sales user was assigned the app's permission set, but the app's tab is still missing. The sandbox install used the Admins Only option. Name two things to check and the least-privilege way to fix each.
Show answer
First, check whether the user has a package license for the app, and assign a license seat under Manage Licenses if not. Second, check that the permission set grants tab visibility and the object and field access the role needs. If the managed set lacks something, add it in your own custom permission set instead of editing a profile or granting Modify All Data.