Sub topic 7
Choosing who gets access at install time
This chapter assumes you can find your way around Setup and know what profiles and permission sets are. It also assumes you have a sandbox to practise in. By the end you should be able to pick an install option for a package, explain what each option changes, and fix a wrong choice before users notice.
Why this choice matters
Installing a package copies its components into your org. These can include custom objects, fields, Apex classes, Visualforce pages, and Lightning components. The installer then asks one question that is easy to click through: who should be able to use all of this?
The answer sets the starting permissions for every profile in the org. A permissive answer can expose package data to people who never needed it. A restrictive answer costs a few extra minutes of setup. For that reason, treat this choice as a security decision and not as an installer default.
The three install options
The installation page for a managed package offers three options.
| Option | Who gets access | Typical use |
|---|---|---|
| Install for Admins Only | The installing administrator and the System Administrator profile | First install in a sandbox, or any app you plan to roll out in stages |
| Install for Specific Profiles | The profiles you select on the page | A known set of users, such as the sales team's profile |
| Install for All Users | Every internal profile in the org | Small orgs, or apps that really are for everyone |
Read the wording on the installation page in your own org. Salesforce adjusts the screen between releases, and the exact set of profiles covered by "All Users" can differ for standard profiles, custom profiles, and Experience Cloud profiles.
What "access" means here
The option you choose sets profile-level access to the package's components. This includes:
- Object permissions (read, create, edit, delete) on the package's custom objects.
- Field-level security on the package's custom fields.
- Access to Apex classes and Visualforce pages in the package.
- Visibility of the package's tabs and apps.
Install options do not touch your existing objects and fields. If the package adds a field to Account, the install option still decides who can see that field.
Admins Only
This is the most conservative option. Nobody except administrators can use the app after installation, so you can look at the package before anyone else can reach it. You then grant access to others on purpose, ideally with permission sets (covered in the next chapter).
Use it as your default, especially when you are not yet sure which roles need the app.
Specific Profiles
This option lets you pick the profiles that get access at install time. It is a good fit when the app clearly serves one team and that team has its own profile.
It has a catch. Profiles are broad. If five different job functions share a single "Standard User" profile, choosing it gives all five functions access. Salesforce also recommends permission sets over profile-based access for new designs, because permission sets are easier to audit and can be assigned to individual users. If your org mixes many job functions in one profile, Admins Only plus permission sets is the finer-grained approach.
All Users
This option gives every internal profile access, with no review step in between. It saves time, and it is the riskiest choice when you have not yet evaluated the package's data access. It is reasonable only when all three of these are true:
- You have already tested the app in a sandbox.
- You know that every user should have it.
- The app's objects hold nothing sensitive.
Before you choose it, ask what happens if the package contains an object that stores personal data. With All Users, every internal profile can reach that object from the first minute.
Making the decision
The following flow gives a sensible path through the decision.
If you are unsure at any branch, take the Admins Only path. You can always widen access later, but you cannot take back data that someone has already seen.
Installing from the command line
The Salesforce CLI covers two of the three options. The --security-type flag accepts AdminsOnly or AllUsers. It has no value for specific profiles, so use the browser installer when you need that option.
sf package install --package 04tXXXXXXXXXXXXXXX --target-org my-sandbox --security-type AdminsOnly --wait 10The pieces of this command:
--packagetakes the version ID, which starts with04t. You find it on the AppExchange listing or from the publisher.--target-orgnames the org by alias. Check the alias before you press Enter. Installing into the wrong org is the easiest mistake to make with the CLI.--security-type AdminsOnlylimits access to administrators.--wait 10makes the command wait up to 10 minutes for the install to finish.
If you leave out --security-type, the CLI applies its own default. Do not rely on a default for a security setting. State it every time.
Other prompts during install
The install option is not the only choice on the page.
- Third-party access. Some packages call external services. The installer shows the domains the package wants to reach, and you must approve them. You cover how to judge these in the earlier chapter on requested access. The point here is that approval is part of the install decision, so do not tick the box without reading the list.
- Package upgrade or install. If a version is already in the org, the page offers an upgrade instead of a fresh install. Upgrades keep your existing access settings unless the new version adds components.
- Permissions to install. The installing user needs the Download AppExchange Packages permission. Keep this permission with few people.
What the choice does not control
Three things are easy to assume and wrong.
- It does not set record sharing. The option sets object and field permissions. Whether a user sees a given record still depends on your sharing model, such as organization-wide defaults, roles, and sharing rules.
- It does not assign licenses. For packages that require licenses, a user needs a license seat as well as access. You will see this in the licensing chapter.
- It does not apply to later versions in the way you might expect. When an upgrade adds new components, check who can reach them. New objects and fields can arrive with access that you have not reviewed.
Worked example: a sales quoting app
Suppose a package adds a custom object Quote_Template__c and a set of Lightning pages. Your org has these profiles: System Administrator, Sales Standard, Support Standard, and Finance Standard.
- You install into a sandbox with Admins Only. Only administrators can see the new tab.
- You review the package's permission sets. You find
Example_App_Userfor everyday use andExample_App_Adminfor configuration. - You assign
Example_App_Userto a single test user on the sales team and check what they can do. - You find that this user can see pricing fields marked sensitive in your org. You note it and decide those fields need field-level restrictions in production.
- For production, you install with Admins Only again, then assign the user permission set to the sales team in a group.
You never used All Users, and nobody outside the sales team gained access. Compare that with All Users from the start. Support and Finance users would see the tab and the object on day one, whether or not they needed them.
Checking what you granted
After the install, confirm the real access instead of trusting the option you picked. List the installed package first.
sf package installed list --target-org my-sandboxThen, in Setup, open the installed package and look at its components. Check object settings for the package's custom objects and see which profiles have access. A quick test is to log in as, or use "Login As" for, a user from a profile that should not have access, and confirm they cannot see the app. The next chapters cover permission sets and verification in more detail.
Correcting a wrong choice
You picked All Users and then realised that was too broad. The fix is straightforward but takes care.
- Open the package's objects and fields in Setup.
- Review profile access and remove it for profiles that do not need it.
- Move the remaining needs to permission sets, so access follows people and not profiles.
- Check any users who may have created data in the meantime, because removing access does not delete their records.
In a sandbox this is a small cleanup. In production, you must also ask whether anyone saw or exported data in the window between install and correction. This is a good reason to rehearse in a sandbox.
Common mistakes
- Choosing All Users to save time. The time you save is minutes. The exposure can last as long as nobody notices.
- Choosing a broad profile for a narrow audience. The "Standard User" profile in many orgs covers far more people than the app's real users.
- Skipping the sandbox. If you choose the install option for the first time in production, you learn what it does at the worst moment.
- Forgetting that the CLI default is not your policy. Pass
--security-typeexplicitly. - Treating install options as the whole access model. They set a starting point. Permission sets, sharing rules, and field-level security finish the job.
Exercise
Your org has one "Standard User" profile that sales, support, and finance staff all share. A new quoting app is meant only for the sales team. Which install option do you choose, and how do you then give the sales team access?
Show answer
Choose Install for Admins Only. Installing for the Standard User profile would give support and finance staff access too, because they share the profile. After installation, assign the app's user permission set to the sales team members, either individually or as a group. Confirm with a test user from sales and another from support that access is correct.
Exercise
A colleague runs sf package install --package 04tXXXXXXXXXXXXXXX --target-org prod --wait 10 without a security type. Name two problems with this command.
Show answer
First, it does not state --security-type, so access depends on a default instead of a deliberate choice. Second, it targets production directly, with no evidence the package was tested in a sandbox first. The command should use --security-type AdminsOnly and run against a sandbox alias until the app has been validated.