PermissionSetGroup

Represents a group of permission sets and the permissions within them. Use permission set groups to organize permissions based on job functions or tasks. Then, you can package the groups as needed.

Parent Type 

This type extends Metadata and inherits its fields.

File Suffix and Directory Location 

Permission set groups are stored in the permissionsetgroups directory. The file name matches the permission set API name and the extension is .permissionsetgroup. For example, a permission set group with the name Finance_Mgmt_PermSetGroup is stored in permissionsetgroups/Finance_Mgmt_PermSetGroup.permissionsetgroup.

Version 

Permission set groups are available in API version 45.0 and later.

Special Access Rules 

As of Summer ’20 and later, to view this type, users must have one of these permissions:

  • View Setup and Configuration
  • Manage Session Permission Set Activations
  • Assign Permission Sets

To edit this type, users must have the Manage Profiles and Permission Sets permission.

Fields 

description 

  • Type: string
  • Required: No
  • Description: The permission set group description provided by the permission set group creator.

hasActivationRequired 

  • Type: boolean
  • Required: No
  • Introduced: API version 53.0
  • Description: Indicates whether the permission set group requires an associated active session (true) or not (false). The default value is false.

label 

  • Type: string
  • Required: Yes
  • Description: Required. The permission set group label.

mutingPermissionSets 

  • Type: string[]
  • Required: No
  • Introduced: API version 46.0
  • Description: A permission set containing permissions to disable in the permission set group.

permissionSets 

  • Type: string[]
  • Required: No
  • Description: A permission set or permission sets included in the permission set group.

status 

  • Type: string (enumeration of type string)
  • Required: No
  • Description: Indicates permission set group recalculation status.
  • Possible values:
    • Updated — The group is current.
    • Outdated — The group requires recalculation.
    • Updating — The group is in recalculation mode.
    • Failed — The group recalculation failed.

Declarative Metadata Sample Definition 

When adding a permission set group, you can do something like this. Individual permissions are included in the permission set referenced, not in the permission set group.

1<?xml version="1.0" encoding="UTF-8"?>
2<PermissionSetGroup xmlns="http://soap.sforce.com/2006/04/metadata">
3     <fullName>Finance_Mgmt_PermSetGroup</fullName>
4     <description>Finance_Mgmt_PermSetGroup desc</description>
5     <label>Finance_Mgmt_PermSetGroup</label>
6     <permissionSets>Billing_PS</permissionSets>
7</PermissionSetGroup>

The permission set Billing_PS contains the individual permissions included in Finance_Mgmt_PermSetGroup.

1<?xml version="1.0" encoding="UTF-8"?>
2<PermissionSet xmlns="http://soap.sforce.com/2006/04/metadata">
3     <fullName>Billing_PS</fullName>
4     <description>Billing_PS</description>
5     <label>Billing_PS</label>
6     <hasActivationRequired>false</hasActivationRequired>
7     <license>Salesforce</license>
8     <userPermissions>
9          <enabled>true</enabled>
10          <name>ViewSetup</name>
11     </userPermissions>
12     <userPermissions>
13          <enabled>true</enabled>
14          <name>ViewRoles</name>
15     </userPermissions>
16     <userPermissions>
17          <enabled>true</enabled>
18          <name>EditBillingInfo</name>
19    </userPermissions>
20</PermissionSet>

This example package.xml manifest retrieves the PermissionSetGroup metadata for an org. When you retrieve permission set groups, also retrieve the related components. For example, to retrieve PermissionSetGroup, you must also retrieve PermissionSet.

1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3     <types>
4          <members>Finance_Mgmt_PermSetGroup</members>
5          <name>PermissionSetGroup</name>
6     </types>
7     <types>
8          <members>Billing_PS</members>
9          <name>PermissionSet</name>
10     </types>
11     <version>45.0</version>
12</Package>

Wildcard Support in the Manifest File 

This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.