To allow users functional access to permission sets only during specified sessions, create a session-based permission set group. For example, grant access to an application only during an authenticated session. Then activate the session-based permission set group in a flow or via the API.
Required Editions
| Available in: both Salesforce Classic (not available in all orgs) and Lightning Experience |
| Available in: Contact Manager, Group, Essentials, Professional, Enterprise, Performance, Unlimited, Developer, and Database.com Editions |
| User Permissions Needed | |
|---|---|
| To create permission sets: | Manage Profiles and Permission Sets |
| To assign permission sets: | Assign Permission Sets |
| To create a permission set group: | Manage Profiles and Permission Sets |
Before beginning, check out Session-Based Permission Set Groups to learn when to use them.
- Create a permission set group and make sure to select Session Activation Required.
-
Assign permission sets to the permission set group.
If you include a regular permission set in your session-based permission set group, the permission set group makes the permission set session-based. Users assigned to the permission set group have access to the permission set for the duration of the session.
-
Assign the permission set group to users.
Before assigning session-based permission set groups to users, ensure that they can meet the conditions of the permission sets in the permission set group.
The session-based permission set group isn’t in effect until a session is activated for it. To activate a session, provide a value for the PermissionSetGroupId field on the SessionPermSetActivation SOAP API. Or, you can create a flow that activates and deactivates the session-based permission set group.