CustomPermission

Represents a permission that grants access to a custom feature.

This type extends Metadata and inherits its fields.

CustomPermission components have the suffix .customPermission and are stored in the customPermissions folder.

Introduced in API version 31.0.

As of Summer ’20 and later, only users who have one of these permissions can access this object:

  • View Setup and Configuration
  • Manage Session Permission Set Activations
  • Assign Permission Sets
  • Type: string
  • Required: No
  • Description: The name of the connected app that’s associated with this permission. Limit: 80 characters.
  • Type: string
  • Required: No
  • Description: The custom permission description. Limit: 255 characters.
  • Type: string
  • Required: No
  • Type: boolean
  • Required: Yes
  • Description: Required. Read-only. Indicates whether the appropriate Salesforce license is required before accessing the permission (true) or not (false).
  • Type: string
  • Required: Yes
  • Description: Required. The custom permission label. Limit: 80 characters.
  • Type: CustomPermissionDependencyRequired[]
  • Required: No
  • Introduced: API version 32.0
  • Description: Indicates which custom permissions are required by the parent custom permission.

CustomPermissionDependencyRequired determines whether a custom permission is required by the parent custom permission. A required custom permission must be enabled when its parent is enabled.

  • Type: string
  • Required: Yes
  • Description: Required. The custom permission name.
  • Type: boolean
  • Required: Yes
  • Description: Required. Indicates whether this custom permission is required by the parent custom permission (true) or not (false).

The following is an example of a CustomPermission component.

The following is an example package.xml that references the previous definition, as well as other custom permissions that are associated with a connected app.

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.