Create a flow that users can run to activate or deactivate a session-based permission set group. The session-based permission set group grants users functional access to permission sets only during specified sessions.
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 |
| To open, edit, or create a flow in Flow Builder: | Manage Flow |
Before beginning, check out Session-Based Permission Set Groups to learn when to use them.
- Create a session-based permission set group.
-
Create a flow in Flow Builder.
- Use a Get Records element to look up the permission set group.
- In the Get Records element, store the permission set group’s name in a variable, so that you can use the name in the action.
- Drag a Core Action element onto the canvas, and choose either Activate Session-Based Permission Set or Deactivate Session-Based Permission Set.
- Activate your flow
- Distribute your flow to the users who must run it.
Create a flow to pass a permission set group name to the Activate Session-Based Permission Set core action. First, add a Get Records element to your flow to look up the PermissionSetGroup object. Set the Name field to the name of your session-based permission set group. Then add the Activate Session-Based Permission Set core action, and set the input to your permission set group name.
When the flow activates the session-based permission set group, the running user obtains access to the permissions specified in your permission set group during the current user session. If the flow deactivates the session-based permission set group, the permissions are no longer available to the user.