Loading
Salesforce Enforces New Security Requirements in Summer 2026Read More
Manage Users and Data Access
Allow Users to Activate or Deactivate a Session-Based Permission Set Group

Allow Users to Activate or Deactivate a Session-Based Permission Set Group

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.

Important
Important You can run queries in flows that also activate session-based permission sets, however, don’t make data or object updates those flows.
  1. Create a session-based permission set group.
  2. Create a flow in Flow Builder.
    1. Use a Get Records element to look up the permission set group.
    2. 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.
    3. Drag a Core Action element onto the canvas, and choose either Activate Session-Based Permission Set or Deactivate Session-Based Permission Set.
  3. Activate your flow
  4. Distribute your flow to the users who must run it.
Example
Example

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.

Tip
Tip Make sure that users who want to run your flow have the Run Flows permission.

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.

 
Loading
Salesforce Help | Article