# Article Name 3 Ways to Delete Users from Salesforce # Article Summary Discover three straightforward methods to delete users from Salesforce, improving system hygiene and admin clarity # Original HTML URL on Toriihq.com https://www.toriihq.com/articles/how-to-delete-users-salesforce # Details 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. ## 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 [https://www.toriihq.com/info/request-a-demo] 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. ### 2. Link your Salesforce instance to Torii When your Torii account is live, hook up your Salesforce org. For step-by-step help see: Salesforce integration guide [https://support.toriihq.com/hc/en-us/articles/5195073819035-Salesforce-Integration]. 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 clientid, clientsecret, username, password, and granttype=password. - The response includes accesstoken and instanceurl. Save both; you’ll need them for each call. ### 2. Look up the User you plan to deactivate - Build a SOQL query: - Call: GET /services/data/v59.0/query/?q=SELECT+Id,IsActive,Name+FROM+User+WHERE+Username='someone@example.com' - 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/{USERID}/action/Freeze - A 204 status means the freeze worked. ### 4. Deactivate the user - Build a PATCH request: PATCH /services/data/v59.0/sobjects/User/{USERID} Body: - 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 - 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/{JOBID} and body {"state":"UploadComplete"}. - Poll /jobs/ingest/{JOBID} 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/{USERID}/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 [https://www.toriihq.com] whenever you're ready to simplify SaaS sprawl and cut waste for good.