# Article Name 3 Ways to Remove Users from Your MongoDB Organization # Article Summary Explore three straightforward methods to remove users from your MongoDB organization, ensuring clean, secure access control # Original HTML URL on Toriihq.com https://www.toriihq.com/articles/how-to-remove-user-from-organization-mongodb # Details Pruning outdated user accounts in MongoDB isn’t just housekeeping; it’s a safety net against accidental data leaks and privilege creep. When contractors finish, teams reshuffle, or an API key goes public, you need a quick response. This guide walks through three reliable paths, Atlas web console, MongoDB CLI, and direct mongosh commands, to drop users cleanly from an organization. You’ll know where to click or type, what roles vanish, and how to confirm access is gone. ## Use MongoDB's UI Use the MongoDB Atlas UI to remove a user from your organization. ### Step 1. Sign in and pick the right organization - Log in to the Atlas UI. - From the organization dropdown at top left, select the organization that holds the user you plan to remove. ### Step 2. Open the Access Manager - In the left menu, expand Organization and click Access Manager. This page lists every user in the organization and the roles they hold. ### Step 3. Locate the user - Scroll or use the search bar to locate the user’s email address. - Confirm the address; deleting it also deletes every organization and project role attached to it. ### Step 4. Start the removal - On that user’s row, open the three-dot menu. - Select Remove User from that menu to begin removal. ### Step 5. Confirm - A confirmation window appears, reminding you that the user will lose access immediately. - Type REMOVE or click Confirm, depending on what your UI shows. After you confirm, the user disappears from the list and can no longer sign in to any project in this organization. ## Use Torii Skip the MongoDB admin screens and let Torii [https://www.toriihq.com/], a SaaS management platform, remove users for you. From a single dashboard, the tool helps teams onboard or offboard people, check subscription details, and handle plenty of other SaaS chores. With Torii, this task becomes fully automated, kicking in whenever a predefined trigger occurs. Typical triggers include a new-hire start date, an exit date, or a contract renewal, which removes the need for repetitive manual effort. Here’s how to remove a user from your MongoDB organization through Torii: ### 1. Sign up for Torii Contact Torii [https://www.toriihq.com/] to request a free two-week proof of concept. ### 2. Connect your MongoDB account to Torii Once your Torii workspace is active, link your existing MongoDB instance. Follow the steps in the MongoDB integration instructions [https://support.toriihq.com/hc/en-us/articles/36168350036251-MongoDB-Integration]. ### 3. Create a Torii workflow for MongoDB In Torii’s Workflows tab, set up an automation that removes the user from MongoDB. Pick a trigger, choose the action to remove the user, and save. From then on, whenever the trigger fires, MongoDB will be updated automatically. ## Use MongoDB's API You’ll call the Atlas Admin API endpoint that deletes a single user record from the org. Nothing happens in the UI, everything depends on one authenticated DELETE request. ### 1. Gather the IDs - orgId: Find it in any Atlas project settings or by calling GET /api/atlas/v1.0/orgs. - userId: Call GET /api/atlas/v1.0/orgs/{orgId}/users and copy the id field for the user you want gone. Keep both IDs handy; they’re path parameters. ### 2. Build the DELETE request Use this endpoint pattern, matching the name in MongoDB’s docs: The request must carry the following headers for Atlas to accept it: - Content-Type: application/json - Accept: application/json - HTTP Digest or basic auth with your public and private API keys. ### 3. Send it Here’s one curl example that uses basic auth; replace placeholders before running: A 200 OK response with the removed user’s JSON appears if the call succeeds. ### 4. Verify the user is gone Run the same listing call you used in step 1: If the userId no longer appears in the array, the deletion stuck. ## Torii for SaaS Management Take control of your SaaS stack and let us know if you'd like to learn more. Torii’s SaaS Management Platform helps you: - Expose shadow apps: Run continuous, AI-backed discovery that spots unauthorized tools the moment they appear, giving you full visibility. - Reduce spend: Find idle seats and duplicate services, then turn them off before they burn cash your teams could use elsewhere. - Automate employee lifecycle tasks: Hand off provisioning and offboarding so accounts open quickly and close on schedule, reducing manual work and risk. - Stay ahead of renewals: Receive early reminders and usage data so you renew only what you need, avoiding surprise invoices later on. Torii unites Finance, IT, and Security around the same data by delivering the first true end-to-end SaaS Management Platform. For a deeper look at the platform and the problems it solves, head over to Torii [https://www.toriihq.com].