Sub topic 3
Who can see Setup: permissions that control access
This chapter assumes you can log in to an org (a Developer Edition org or a sandbox) and know what objects, fields, users, profiles, and permission sets are. You don't need to have built any of them yet.
Setup is a set of pages that change how the whole org behaves, so Salesforce gates it with permissions. If a page is missing from your Setup menu, or you can open it but can't save, a permission is almost always the cause. After this chapter you should be able to tell which permission is missing and where to check it.
Setup access is a stack of permissions
No single "can use Setup" switch exists. Access works in layers:
- Seeing Setup at all. The gear icon and the Setup menu are tied to the system permission View Setup and Configuration.
- Seeing specific pages. Many pages need their own permission on top of the first layer.
- Changing things. Editing usually needs a stronger permission, such as Customize Application or Manage Users.
A system permission is a switch on a profile or permission set that is not tied to one object or field. It enables a feature or an administrative capability.
The permissions you will meet most often
| Permission | What it allows | Typical use |
|---|---|---|
| View Setup and Configuration | Open Setup and view many configuration pages and the Setup Audit Trail | Auditors, support staff, developers who only need to look |
| Customize Application | Create and edit most declarative configuration, such as custom fields, page layouts, and validation rules | Administrators, delegated configuration builders |
| Manage Users | Create and edit users, and manage profiles and permission sets in many cases | User administrators |
| Manage Profiles and Permission Sets | Create and edit profiles and permission sets | Security administrators |
| Assign Permission Sets | Assign existing permission sets to users, without editing them | Helpdesk staff |
| Author Apex | Create and edit Apex classes and triggers | Developers |
| Modify All Data | Create, edit, and delete every record regardless of sharing | Rarely granted; much broader than Setup |
| Modify Metadata Through Metadata API Functions | Deploy and retrieve metadata through the Metadata API, but not necessarily see all of Setup | Deployment users and integrations |
The exact list varies by edition and release. Treat this table as a map, then confirm the details in the Salesforce Help page for the specific Setup page you need.
View versus change
View Setup and Configuration lets a user read configuration. It does not let them change it. A user with only that permission can open Object Manager and read an object's fields, but the Edit and New buttons will be missing or will fail on save.
Customize Application is the usual permission for changing configuration. It does not cover everything. User management needs Manage Users, and Apex needs Author Apex. Customize Application is also not the same as Modify All Data, which controls record data rather than configuration.
Where permissions come from
A user's effective permissions are the union of everything granted to them. Nothing in that union is subtracted by another source.
- Profile. Every user has exactly one profile. It is the base set of permissions.
- Permission sets. A user can have many. Each one adds permissions on top of the profile.
- Permission set groups. A bundle of permission sets assigned as one unit.
Because access only adds up, you remove a permission by taking it away from every source that grants it. That includes a profile, any permission set, and any group the user belongs to.
The current best practice is to keep profiles minimal and grant Setup abilities through permission sets. A "Support Auditor" permission set with View Setup and Configuration is easier to review and revoke than a cloned profile.
Checking your own access
You can check access from the interface or with a query.
- Click your avatar, then Settings, to see your basic user details. Note your Profile name.
- In Setup, search Profiles in Quick Find. Open your profile and look for System Permissions.
- In Setup, search Permission Sets. Open any permission sets assigned to you and check their System Permissions too.
- As an administrator, open a user record and use Permission Set Assignments to see what is assigned to that user.
Every profile has a hidden permission set record behind it. That means a SOQL query on PermissionSet finds permissions granted by profiles and by permission sets in one pass. This query lists everything that grants the three permissions discussed above:
SELECT Label, IsOwnedByProfile, Profile.Name,
PermissionsViewSetup, PermissionsCustomizeApplication, PermissionsModifyAllData
FROM PermissionSet
WHERE PermissionsViewSetup = true
OR PermissionsCustomizeApplication = true
OR PermissionsModifyAllData = trueRows where IsOwnedByProfile is true come from a profile, and Profile.Name is filled in. Rows where it is false are standalone permission sets. This query only shows where a permission lives. To list the people who hold one, query assignments:
SELECT Assignee.Name, Assignee.Username, PermissionSet.Label, PermissionSet.Profile.Name
FROM PermissionSetAssignment
WHERE PermissionSet.PermissionsCustomizeApplication = true
ORDER BY Assignee.NameYou can run either query in the Developer Console Query Editor or with the CLI:
sf data query --query "SELECT Assignee.Name, PermissionSet.Label FROM PermissionSetAssignment WHERE PermissionSet.PermissionsCustomizeApplication = true"A user appears once for each permission set or profile that grants the permission, so duplicates are normal.
Common cases and edge cases
The gear icon is missing. The user probably lacks View Setup and Configuration. A user may also have limited Setup access through a delegated or specialized permission and see a reduced menu.
Setup opens but a page is empty or says "Insufficient Privileges". The user can enter Setup but lacks the permission that page needs. Read the page's Help topic to find which permission it requires.
A user can view but not edit. This is the expected result of View Setup and Configuration alone. Add the specific edit permission through a permission set. Don't switch the user to a more powerful profile.
A permission was removed but the user still has access. Look for another source. The same permission may be on a second permission set, in a permission set group, or on the profile. Because permissions are cumulative, the user keeps the access until all of them are revoked.
A user can deploy metadata but not browse Setup. Metadata API permissions and Setup visibility are separate. An integration user may need Modify Metadata Through Metadata API Functions without any Setup access.
Sandboxes differ from production. Profiles and permission sets are metadata, so they normally copy into a sandbox. Users are copied too, depending on the sandbox type. Before you judge that a permission is wrong, confirm you are in the org you think you are in.
Delegated administration
Delegated administration is a feature that lets an administrator hand limited admin tasks to non-administrators. A delegated administrator can be given, for example:
- Management of users in specified roles, and their ability to assign specific profiles.
- Permission to assign specific permission sets.
- Login-as access for users in those roles, where enabled.
- Management of specific custom objects.
Find the setup under Setup, then Delegated Administration in Quick Find. This is a safer way to let a regional manager reset passwords for their team than granting Manage Users to the whole group.
Least-privilege habits
- Give new Setup users View Setup and Configuration first, and add edit permissions only when a task requires it.
- Put Setup abilities in named permission sets that describe a job, such as "Field Builder", so reviews are simple.
- Keep the number of full administrators small. Name at least two, so one absence doesn't block you.
- Review the Setup Audit Trail (covered in a later chapter) after granting any administrative permission.
- Test with a real non-admin user or a sandbox user. Don't assume that being able to open a page as an admin means others can.
Exercise
A support analyst needs to read the fields on the Account object in Object Manager, but must not be able to add or change fields. Which permission setup fits, and how would you check who currently holds Customize Application in the org?
Show answer
Give the analyst View Setup and Configuration, preferably through a permission set, and do not give Customize Application. That lets them open Setup and read the configuration without editing it. To check who holds Customize Application, query PermissionSetAssignment where PermissionSet.PermissionsCustomizeApplication is true, which includes both profile-based and permission-set-based grants.
Exercise
You removed Customize Application from a user's profile, but the user can still create custom fields. Name two places to look.
Show answer
Check the permission sets assigned to the user, and check any permission set groups assigned to the user. Permissions add up, so any of these sources can still grant the permission. A query on PermissionSetAssignment for that user, filtered to PermissionsCustomizeApplication = true, shows which source it is.