---
schema_version: "1"
id: 7d90eb7b8c842a7da67c5b30a309d75923b0e191e2a84f52811b11ebb1598510
title: Allow Users to Activate or Deactivate a Session-Based Permission Set Group
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/perm_set_groups_session_activate_flow.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.perm_set_groups_session_activate_flow.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: b3c358751bf9cfcc3ab41e1bab5817d75ee6e44f2fc87438d4159927e3256040
description: 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.
products:
  - Security
  - Salesforce Platform
release: "264"
---
# 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

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: both Salesforce Classic (<a href="https://help.salesforce.com/articleView?id=overview_edition_lex_only.htm&amp;language=en_US" target="_blank">not available in all orgs</a>) and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Contact Manager</strong>, <strong>Group</strong>, <strong>Essentials</strong>, <strong>Professional</strong>, <strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, <strong>Developer</strong>, and <strong>Database.com</strong> Editions</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d38959e92">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d38959e92 ">To create permission sets:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d38959e92 ">Manage Profiles and Permission Sets</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d38959e92 ">To assign permission sets:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d38959e92 ">Assign Permission Sets</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d38959e92 ">To create a permission set group:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d38959e92 ">Manage Profiles and Permission Sets</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d38959e92 ">To open, edit, or create a flow in Flow Builder:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d38959e92 ">Manage Flow</td>

          </tr>
        </tbody>
      </table>

Before beginning, check out [Session-Based Permission Set Groups](https://help.salesforce.com/s/articleView?id=platform.perm_set_groups_session_use.htm&release=264.0.0&type=5 "A session-based permission set group applies to a specific user session and grants users functional access to the permission sets included in the permission set group.") to learn when to use them.

![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-access-264-0-0-production-enus/a92be132-3cbc-412a-9262-130636120c14/images/icon_important.png)

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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-access-264-0-0-production-enus/a92be132-3cbc-412a-9262-130636120c14/images/icon_example.png)

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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-access-264-0-0-production-enus/a92be132-3cbc-412a-9262-130636120c14/images/icon_tip.png)

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.