Sub topic 10
Permission set groups: bundling permission sets by job function
This chapter assumes you know what a permission set is, how object permissions and field-level security work, and how to assign a permission set to a user. It covers how a permission set group bundles permission sets so you can assign one thing per job function.
Why groups exist
A sales representative may need Account read access, Opportunity edit access, and a few system permissions. If each of these is a separate permission set, every new hire needs several assignments. When the job changes, an admin has to find and update each one.
A permission set group (PSG) is a container for permission sets. You assign the group to a user, and the user receives the combined permissions of every permission set inside it. Add a permission set to the group later, and every assigned user gets it.
How permissions combine
Permissions are additive. A user's access is the union of their profile, any directly assigned permission sets, and the permission sets in any assigned groups. If two permission sets conflict, the more permissive setting wins. For example, if one set gives Read on a field and another gives Edit, the user can edit it.
Building a group in Setup
- In Setup, enter Permission Set Groups in Quick Find and open it.
- Click New Permission Set Group.
- Enter a label such as Sales Representative. Salesforce suggests an API name. Add a description.
- Save, then open Permission Sets in Group and add the permission sets you want.
- Go to Assigned Users and add users.
Note that group membership lists permission sets by API name, not by label.
The group as metadata
The same group can be represented in Metadata API format. Each permissionSets element holds the API name of one member.
<?xml version="1.0" encoding="UTF-8"?>
<PermissionSetGroup xmlns="http://soap.sforce.com/2006/04/metadata">
<label>Sales Representative</label>
<description>Everything a sales rep needs</description>
<permissionSets>Account_Viewer</permissionSets>
<permissionSets>Opportunity_Editor</permissionSets>
</PermissionSetGroup>A later chapter covers muting permission sets, which you add to a group with a mutingPermissionSets element to remove specific permissions.
Design guidance
- Name groups after job functions, such as Sales Representative or Support Agent. Name permission sets after capabilities, such as Account Viewer.
- Keep each permission set focused on one capability. Small sets are easier to reuse across groups.
- Put job-specific bundles in groups, and keep access shared by everyone in the baseline profile.
Common errors
- Assuming a group replaces the profile. Every user still has exactly one profile. Anything the profile grants stays, and the group adds to it.
- Expecting changes to apply instantly. When you change a group's members, Salesforce recalculates the combined permissions. The group's status shows whether that has finished, and a later chapter covers the statuses.
- Mixing up labels and API names. In metadata, use the API name, for example
Account_Viewer. - Missing license requirements. A permission set can't be assigned to a user whose license doesn't support its permissions. This also applies to groups that contain it.
Exercise
A user has a profile that grants Read on Account. They are assigned a group whose only permission set grants Edit on Account. What access does the user have on Account, and why?
Show answer
The user can read and edit Accounts. Permissions are additive, so the user receives the union of the profile and the group's permission sets. The more permissive setting wins.