In Salesforce, we often need to manage user accounts efficiently, generally with large user datasets. Mass deactivating users is a common task that can be done efficiently using Salesforce Data Loader.
In this Salesforce tutorial, we will learn how to mass deactivate multiple users in Salesforce via the data loader and ensure a smooth user management experience.
Mass Deactivate users in Salesforce via Data Loader
To mass deactivate users in Salesforce via Data Loader, make sure that you have installed the Data Loader tool in your system and have the necessary admin credentials to access Salesforce and perform user management tasks.
If you meet the above criteria then follow the below steps.
Create a CSV file to Mass Deactivate users in Salesforce
To create a CSV file, we first need to run a data export for the user data to get the details like id and status.
1. Now run a data export for the user object by following the below steps.
- Open the Data loader and click on the Export button.
- Select the data object User and click Next.
- Select the query fields ID and IsActive and select a reference field like Name.
- Click Finish
2. Open the extracted CSV file and modify the IsActive for the user accounts that you have to deactivate. To deactivate the users, change the IsActive status to False.

3. Now remove the rest of the records and save the CSV file to the location from where it can be accessed by the data loader.

Till we have prepared the CSV file to deactivate the activated users’ accounts, in the below steps, we will run a data update operation to mass deactivate the users.
Update User object to deactivate users’ accounts
To update the user’s status from active to deactivated, open the Salesforce data loader tool and follow the below steps.
1. Again, open the data loader and click on the Update button.

2. In this step, select the data object User and select the CSV file that we have created in the above steps. After this, click on the Next button.

3. Now, the data loader will initialize the uploaded CSV file and display the number of rows in the CSV file. Here, click on the OK button.

4. In this step, we will map the header column of the CSV file with the object field names, and to do that, click on the button Create or Edit a Map. Then, in the Mapping Dialog window, click on Auto-Match Fields to Column.
If the field names are not auto-matched, then you have to drag the object fields down to the column mapping.
After mapping, click on the OK button, then click on the Next button.

5. In this step, select the location for the success and error files from where they can be accessed later, and last click on the Finish button.

6. Now, a warning message will appear regarding the data update operation. Here, click on the Yes button to proceed.

7. As we process, the data update will start, and after its completion, a dialog box will display the number of successes and errors that occurred during the data update operation.
Here, In this data operation, we got the success message without any errors. You can view the successes and errors by clicking on the buttons view errors and view successes.
Now click on the OK button to close the data loader wizard.

8. To view the deactivated users, open the Salesforce developer console then from the Quick Find search and select Users.
In the User setup window, select View deactivated users, and here you will see the accounts of the users that we have deactivated using the Salesforce data loader.

Now we have successfully deactivated the selected users, and in this way, we can Mass deactivate users in Salesforce via data loader by following the above steps.
Conclusion
In Salesforce, efficiently managing user accounts is important for maintaining a secure and organized Salesforce environment, and by following the above example, you might have understood the process of Mass deactivating users in Salesforce via data loader.
By now, you will be able to use Salesforce Data Loader to mass deactivate users, streamlining your user management processes and ensuring a more effective administration of your Salesforce instance.
You may like to read:
- How to Deactivate Salesforce User
- How to Activate or Deactivate a User From Salesforce Apex
- How to Freeze or Unfreeze Multiple Users via Salesforce Data Loader
- How to Deactivate the Salesforce Developer Edition Org
- Auto-Deactivate Users with Schedule-Triggered Flow in Salesforce
- Insert Multiple Users With Data Loader in Salesforce
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.