3 Ways to Delete Users from Salesforce

Discover three straightforward methods to delete users from Salesforce, improving system hygiene and admin clarity
mugshot Chris Shuptrine
Jun 2025
3 Ways to Delete Users from Salesforce

A crowded Salesforce org makes it hard to spot real activity and raises security risks. Old test logins, departed employees, or duplicated accounts hang around, eating up licenses and confusing reports.

Cleaning house is easier than many admins think. Below, you’ll see three ways to delete users, through Setup, Data Loader, and the command-line Data API, so you can keep the system lean, accurate, and compliant.

Table of Contents

Use Salesforce’s UI

Use the Salesforce UI to deactivate, Salesforce’s term for “delete,” a user you no longer need active in the org.

Step 1. Open Setup

  • Click the gear icon in the upper-right corner.
  • Select Setup. The Setup Home page loads.

Step 2. Find the user record

  • In the Quick Find box, type Users.
  • Click Users in the search results. A full list of org users appears.
  • Use the view filters or search bar to locate the person you plan to remove.

Step 3. Freeze the user (optional but handy)

  • If the user is still logged in, click the Freeze link next to their name.
  • Freezing logs them out immediately and blocks new sessions while you finish the cleanup.

Step 4. Deactivate the user

  • Click Edit next to the user’s name.
  • Clear the Active checkbox.
  • Click Save. Salesforce Help notes that deactivation is the supported “delete” action for users; the record remains for history, yet the license opens up.

Step 5. Reassign anything they own

  • Open the Mass Transfer tools under Setup > Data Management when the user owns many accounts, leads, or custom objects.
  • Follow the prompts to hand those records to someone else.
  • If the user was the sole owner of dashboards or reports, switch ownership in each folder or by using Analytics Sharing settings.

Step 6. Release seats and clean up permission sets

  • On the Users list, confirm the user now shows as Inactive.
  • Check Setup > Company Information to verify the license count updated.
  • Remove any permission set assignments still linked to the inactive user to keep things tidy.

Step 7. Double-check login history

  • Go to Setup > Login History.
  • Make sure the user can no longer sign in. If you skipped the Freeze step earlier and still see logins, repeat Step 3.

The user is deactivated, the license is free for someone else, and your org stays clean and secure.

Use Torii

You don’t want to delete users inside Salesforce itself; Torii, a SaaS management platform, can handle the work for you. The tool gathers all cloud apps in one dashboard, simplifying onboarding, offboarding, license tracking, and other routine chores.

Torii’s automation means user removal runs by itself after the initial setup. You might trigger it when someone joins, leaves, or when a contract hits its end date. Handing the busywork to software cuts manual effort and slip-ups.

To remove Salesforce users via Torii, follow the steps below. The workflow is straightforward and usually takes less than ten minutes to configure, even for first-time users.

1. Sign up for Torii

Contact Torii Sales and ask for a complimentary two-week proof-of-concept. Your account rep will spin up the trial and walk you through the basics over a short call.

When your Torii account is live, hook up your Salesforce org. For step-by-step help see: Salesforce integration guide. If you get stuck, the guide walks through every permission and API setting in plain language.

3. Build a Torii workflow for Salesforce

Open the Workflows tab, choose a trigger, then add an action to delete users in Salesforce. After that, each time the trigger fires, Torii clears the matching Salesforce accounts on its own.

Use Salesforce’s API

Salesforce never truly deletes a User record, but you can deactivate it via the API so the person can’t log in or consume a license. Below is the straight-through path, no UI clicks required.

1. Get an OAuth access token

  • Send a POST to /services/oauth2/token with your client_id, client_secret, username, password, and grant_type=password.
  • The response includes access_token and instance_url. Save both; you’ll need them for each call.

2. Look up the User you plan to deactivate

  • Build a SOQL query:
SELECT Id, IsActive, Name
FROM User
WHERE Username = '[email protected]'
  • Call:

GET /services/data/v59.0/query/?q=SELECT+Id,IsActive,Name+FROM+User+WHERE+Username='[email protected]'

  • Grab the Id from the JSON response.

3. Freeze the user (optional safety step)

Freezing the account blocks logins immediately, even before the deactivation process finishes.

  • Call:

POST /services/data/v59.0/sobjects/User/{USER_ID}/action/Freeze

  • A 204 status means the freeze worked.

4. Deactivate the user

  • Build a PATCH request:

PATCH /services/data/v59.0/sobjects/User/{USER_ID}

Body:

{
    "IsActive": false
}
  • A 204 response shows the update passed. The user can no longer sign in.

5. (Bulk) Deactivate many users in one shot

If you need to turn off dozens or hundreds of accounts:

  • Create a Bulk API v2 job
POST /services/data/v59.0/jobs/ingest
{
    "object" : "User",
    "operation" : "update",
    "lineEnding" : "LF"
}
  • Upload a CSV where each row has Id,IsActive, with IsActive set to false.
  • Close the job with

PATCH /services/data/v59.0/jobs/ingest/{JOB_ID} and body {"state":"UploadComplete"}.

  • Poll /jobs/ingest/{JOB_ID} until state reads JobComplete or Failed. Review the result files to see which rows, if any, didn’t process.

6. Clean up licenses and sessions

  • Clear sessions:

DELETE /services/data/v59.0/sobjects/User/{USER_ID}/sessions

  • Re-Allocate licenses or permission sets through the same Bulk or REST endpoints you normally use for assignments.

7. Confirm the change

Run the same SOQL query you used in step 2. IsActive should now read false.

Torii for SaaS Management

If you want to squeeze more value from your SaaS stack and see what you’re paying for, let us know. Torii’s SaaS Management Platform helps you to:

  • Expose shadow IT: Continuous scans flag every unapproved or hidden app before it causes trouble.
  • Reduce spend: Spot unused licenses and overlapping tools so you can cut costs fast.
  • Automate onboarding/offboarding: Automate user provisioning and deprovisioning to save hours and avoid errors.
  • Never miss a renewal: Receive timely alerts well before contracts expire, giving you room to act.

Torii brings Finance, IT, and Security together on one unified SaaS management platform, so everyone works from the same data.

Learn more at Torii whenever you’re ready to simplify SaaS sprawl and cut waste for good.

Frequently Asked Questions

Salesforce treats deletion as deactivation. You can remove users through Setup’s Users list, via Data Loader or command-line API, or by letting Torii run an automated workflow. Freeze sessions, uncheck "Active," reassign ownership, and the license instantly frees up.

Yes. Open Setup, search for Users, optionally click Freeze to force logout, edit the record, clear the "Active" checkbox, and save. The account remains for audit history, but the person loses access and the seat becomes available.

Deactivating a user immediately releases the Salesforce license back into the pool. You can see the updated count in Setup > Company Information and assign the freed seat to a new employee without buying an extra subscription.

Use the Bulk API v2. Create an update job on the User object, upload a CSV with "Id,IsActive" columns where IsActive is false, close the job, then poll until JobComplete. Salesforce deactivates every listed account in one run, saving hours.

After connecting your Salesforce org, Torii lets you set a workflow trigger such as termination date. When the rule fires, Torii calls Salesforce’s API to freeze, deactivate, and reclaim licenses automatically, eliminating manual clicks and reducing errors.

No. Deactivation only blocks logins and frees the license; it does not erase data. The user record, ownership history, reports, and audit trails remain intact, so you can still track who created or modified each object.

Get a Complete View of Your SaaS Spend

Find hidden apps, cut SaaS waste, automate off/on-boarding, and get contract renewal alerts.

Get a Demo
Torii Dashboard Screenshot