PermissionSetLicense

Represents a license that’s used to enable one or more users to receive a specified permission without changing their profile or reassigning profiles. You can use permission set licenses to grant access, but not to deny access. This object is available in API version 29.0 and later.

Supported Calls

describeSObjects()query()retrieve()

Fields

Field Name Details
DeveloperName
Type
string
Properties
Filter, Group, Sort
Description

The unique name of the object in the API. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.

Note

Note

When creating large sets of data, always specify a unique DeveloperName for each record. If no DeveloperName is specified, performance may slow while Salesforce generates one for each record.

ExpirationDate
Type
date
Properties
Filter, Group, Nillable, Sort
Description
The date at which the permission set license expires.
Language
Type
picklist
Properties
Filter, Group, Restricted picklist, Sort
Description

The language of the permission set license.

MasterLabel
Type
string
Properties
Filter, Group, Sort
Description
The label of the permission set license. Label is Permission Set License Label.
MaximumPermissionsPermissionName
Type
boolean
Properties
Filter,
Description
One field for each permission. For example, MaximumPermissionsIdentityConnect corresponds to the “Use Identity Connect” permission.

If true, this PermissionSetLicense grants the specified permission. The number of fields varies depending on the permissions available for the organization.

MaximumPermissionsShowCompanyNameAsUserBadge
Type
boolean
Properties
Filter
Description
When on, a user’s company name, if available, will be displayed in place of the community role.
PermissionSetLicenseKey
Type
string
Properties
Filter, Group, idLookup, Sort
Description
A string that uniquely identifies a particular permission set license.
Status
Type
picklist
Properties
Filter, Group, Restricted picklist, Sort
Description
The status of a permission set license. If Active, the permission set license is available. If Disabled, the permission set license has expired.
TotalLicenses
Type
int
Properties
Filter, Group, Sort
Description
The total number of this permission set license that are available to your organization.
UsedLicenses
Type
int
Properties
Filter, Group, Sort
Description
The number of this permission set license that are currently assigned to users.

Usage

Users with the “View Setup and Configuration” permission can use the PermissionSetLicense object to view the set of currently defined permission set licenses in your organization.

Use the PermissionSetLicense object to query existing permission licenses.

For example, to return a list of all active permission set licenses:
SELECT MasterLabel 
FROM PermissionSetLicense
WHERE Status = 'Active'
When combined with the PermissionSetLicenseAssign object, you can create a nested query that returns all users assigned to a particular permission set license like “Identity Connect”:
SELECT MasterLabel, (SELECT AssigneeId FROM PermissionSetLicenseAssignments) 
FROM PermissionSetLicense 
WHERE MaximumPermissionsIdentityConnect=true

See Also