How to Mass Deactivate users in Salesforce via Data Loader

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 about the process of deactivating multiple users simultaneously and ensuring 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.

Deactivate users in Salesforce via Data loader

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.

Mass Deactivate Salesforce users via 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.

See also  How to Mass Delete Opportunities in Salesforce using Data Loader

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.

Deactivate multiple Salesforce users via data loader

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.

Use data loader to mass deactivate users in Salesforce

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.

How to deactivate Mass Users in Salesforce via data loader

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.

Mass Deactivate Users in Salesforce via data loader

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.

Mass Deactivate Salesforce user accounts via Data loader

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

Salesforce Users account deactivation from data loader

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.

See also  How to Delete the Records Using Data Loader in Salesforce

Now click on the OK button to close the data loader wizard.

Mass deactivating Salesforce users with data loader

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.

Mass User deactivate in Salesforce via 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: