Loading
Salesforce Enforces New Security Requirements in Summer 2026Read More
Manage Users and Data Access
Let Users Scramble Their User Data

Let Users Scramble Their User Data

When users no longer want their personal data recognized in Salesforce, you can permanently scramble the data with the System.UserManagement.obfuscateUser Apex method. However, when you invoke the method for a user, the data becomes anonymous, and you can never recover it. As an extra precaution, you can’t use the method until you enable Scramble Specific Users’ Data for your org.

Required Editions

Available in: both Salesforce Classic and Lightning Experience
Available in: Enterprise, Performance, Unlimited, and Developer Editions
User Permissions Needed
To enable the Scramble Specific Users’ Data setting: Customize Application
  1. From Setup, enter User in the Quick Find box, then select User Management Settings.
  2. Enable Scramble Specific Users’ Data.
  3. Invoke the obfuscateUser method one of several ways. For example, you can use custom Apex triggers, processes, workflows, or the Developer Console.
    Note
    Note Invoking obfuscateUser method doesn’t trigger an email change notification.

This feature is part of our effort to protect users’ personal data and privacy. For more information on what you can do to actively protect user data, see Data Protection and Privacy.

For more information about obfuscateUser, see the UserManagement Class in the Apex Reference Guide.

 
Loading
Salesforce Help | Article