Sub topic 6
Permission set licences and feature licences
This chapter assumes you know what a user licence and a profile are, and that you can open Setup and run a SOQL query. You should also know that a permission set grants extra access on top of a profile.
Why a second kind of licence exists
A user licence decides which profiles a user can have. Some features need more than that. A permission set that grants a specialised feature, such as certain analytics or industry tools, can require its own licence. That licence is a permission set licence (PSL).
A PSL does not replace the user licence. It adds the right to use a feature on top of it. A user needs both.
The working model
Think of three layers:
- The user licence sets the base set of features, and which profiles are allowed.
- The permission set licence unlocks a feature for that user.
- The permission set grants the specific permissions that use the feature.
If the permission set requires a PSL, Salesforce will not let you assign the permission set until the user holds that PSL. In the UI, you assign the PSL first. Some permission sets assign the required PSL for you, but you should not rely on this, so check the user's record afterwards.
Feature licences
A feature licence is a separate, per-user switch on the user record. It turns on a product area for that user. Examples include Marketing User, Knowledge User, Service Cloud User and Flow User. You tick the box on the user's detail page, and it consumes one unit of that licence.
The two kinds of licence differ in how you assign them:
| Licence type | Where you assign it | What it enables |
|---|---|---|
| Permission set licence | Permission Set License Assignments on the user | Permission sets that need it |
| Feature licence | Checkbox on the user record | A product area for that user |
Feature licences are not tied to permission sets. A user with the Knowledge User box ticked still needs the right object and field permissions to work with articles.
Checking PSL capacity
Before assigning a permission set that requires a PSL, confirm that seats remain. Run this query in the Developer Console Query Editor.
SELECT MasterLabel, TotalLicenses, UsedLicenses
FROM PermissionSetLicense
ORDER BY MasterLabelSubtract UsedLicenses from TotalLicenses to get the seats left. You can also see the same figures under Setup, in Company Information, in the Permission Set Licenses related list.
Assigning a PSL in Setup
- Open Setup and go to Users, then Users.
- Click the user's name.
- In the Permission Set License Assignments related list, click Edit Assignments.
- Tick the licence and save.
- Assign the permission set that needs it.
Common errors
- Insufficient licences. The error appears when
UsedLicensesequalsTotalLicenses. Free a seat by removing the PSL from a user who no longer needs it, or buy more. - Permission set will not assign. The user lacks the required PSL. Assign the PSL first.
- Cannot remove a PSL. Salesforce blocks removal while the user still holds a permission set that depends on it. Remove that permission set assignment first.
- Feature box missing. The checkbox only appears when the org owns that feature licence.
Exercise
A user has the correct profile, but you cannot assign a permission set that grants a specialised feature. The permission set requires a PSL. What are the two checks you make, and in what order?
Show answer
First, check capacity with the PermissionSetLicense query. TotalLicenses must be greater than UsedLicenses. Second, assign the PSL to the user, then assign the permission set. If the PSL is not assigned first, the permission set assignment fails.
Exercise
What is the difference between a permission set licence and a feature licence?
Show answer
A permission set licence is assigned through the user's Permission Set License Assignments and unlocks permission sets that require it. A feature licence is a checkbox on the user record that turns on a product area, such as Knowledge User, for that user.