Within Salesforce, user access can be extended by assigning Permission Sets to users that provide additional features or functionality.
Special types of Permission Sets exist that are owned by a Profile (IsOwnedByProfile). These permission sets cannot be removed without changing the profile.
Within this knowledge article, we will guide you through the process of using a Flow to delete Permission Set assignments while ensuring those owned by a Profile remain intact.
This example uses the Flow operator Not In that was introduced in the Winter ‘23 Release.
Object Model
Before we dive into the how-to part of this article, let’s visit the object model to understand how Permission Set assignments are handled.
Within Salesforce, a Permission Set License represents a license that can be assigned to a user without changing their profile. A Permission Set License Assign represents the relationship between a user and a Permission Set License. A Permission Sets represents a group of permissions that are assigned to a user via a Permission Set Assignment.
Due to the relationship model between these objects, specifically Permission Sets, Permission Set Assignments, and users within our Flow, we need to delete Permission Sets that are not owned by a profile with a Permission Set Assignment related to the current user.
Go with the Flow
000394118

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.