DEV Community

Demo
Demo

Posted on • Originally published at orgdoc.dev

How to reduce Salesforce permission set bloat in 30 minutes

Permission set bloat is the silent killer of Salesforce security and admin efficiency. In my decade managing enterprise orgs across healthcare, retail, and finance, I've seen teams inherit 200+ permission sets from legacy projects—leading to audit failures, over-privileged users, and wasted admin hours. The good news? You can eliminate 80% of this bloat in 30 minutes. Here's exactly how.

Step 1: Identify Unused Sets (5 Minutes)

Run this SOQL query to find permission sets not assigned to any user:


SELECT Id, Name 
FROM PermissionSet 
WHERE Id NOT IN (SELECT PermissionSetId FROM PermissionSetAssignment)
AND IsOwnedByAdmin = true

Enter fullscreen mode Exit fullscreen mode

Example: At a Fortune 500 retail client, this query uncovered 47 unused sets like "Legacy_Inventory_Reporting" and "Old_Sales_App" (created during a failed 2019 project). Removing these cut the total permission set count by 19% immediately.

Step 2: Merge Duplicates (15 Minutes)

Don't delete yet—merge duplicates first. Use Permission Set Manager to:

  • Compare sets with identical object/field permissions (e.g., "Sales_User_Standard" and "Sales_User_Standard_v2").

  • Combine permissions into one set (e.g., rename "v2" to "Sales_User_Standard").

  • Reassign users to the merged set via the "Assign Permission Sets" button.

Real-world case: A healthcare client had 12 nearly identical "Clinic_Nurse" sets. Merging them into one set reduced assignments from 280+ to 1, eliminating weekly admin checks for inconsistencies.

Step 3: Eliminate Redundant Groups (10 Minutes)

Check for permission sets with identical assignments but different names. For example:

  • "Marketing_Contact_Viewer" (assigns access to Contact object)

  • "Marketing_Salesforce_Viewer" (also assigns access to Contact object)

Use this SOQL to find redundant sets:


SELECT Id, Name 
FROM PermissionSet 
WHERE Id IN (
  SELECT PermissionSetId FROM PermissionSetAssignment 
  GROUP BY PermissionSetId 
  HAVING COUNT(UserId) > 1
)

Enter fullscreen mode Exit fullscreen mode

At a financial services client, this revealed 9 duplicate sets for "Compliance_Viewer." Merging them into one set prevented 12 hours of weekly permission reconciliation.

Prevent Recurrence (The 30-Second Habit)

Stop future bloat with one rule: Require a business justification form for every new permission set. In our org, this reduced new sets by 73% in Q3. Also, run your SOQL query during quarterly permission reviews—don’t wait for audits to catch the mess.

Permission sets aren’t just a security risk—they’re a management liability. By focusing on unused sets and duplicates, you’ll cut admin overhead, pass audits, and reduce security exposure. Do this quarterly, and your org will thank you.

Ready to find your permission set bloat? Get a free, automated health scan at orgscanner.dev—it identifies unused sets, duplicates, and security risks in seconds. No fluff. Just actionable insights.

📚 Recommended Resource: Salesforce for Dummies — great for anyone learning Salesforce.

📚 Recommended Resource: NIST Cybersecurity Framework Guide — great for anyone security frameworks.


Need a second opinion on your Salesforce org? Request a diagnostic.

Top comments (0)