I have to remove 200 users (Removing user access at the *organization level*). how can i do it at scale using service account
Hi Akshay J., Please stand by as I search the Mixpanel knowledge base for an AI-powered answer. I normally take about 15 seconds or so. In case AI cannot answer your question, feel free to reach out to Mixpanel support at mixpanel.com/get-support. If you have follow-up questions for this thread, please tag me again with your question: @kapa.ai <follow-up question> 👋
Feel free to ask a follow-up question once I've answered by mentioning me with @kapa.ai
Mixpanel’s public docs show how to bulk‑manage service accounts via API, but not how to bulk‑remove human users from an organization using a service account. The “Service Accounts API” is specifically for creating/deleting service accounts and adding/removing them from projects or the org. [Service Accounts overview] For service accounts, you can at scale: - Delete a service account from the org (removes from all projects) via
DELETE /organizations/{organizationId}/service-accounts/{serviceAccountId} [Delete service account]
- Add/remove service accounts to/from projects via
- POST /organizations/{organizationId}/service-accounts/add-to-project
- POST /organizations/{organizationId}/service-accounts/remove-from-project [Project membership methods] However, the docs you shared about roles & permissions and inviting/removing users only describe doing this via the UI, not via an API endpoint. [Roles overview; Permissions] Because there is no documented API for removing normal user accounts from the organization in these sources, I can’t reliably give you an API-based, service-account-driven bulk removal flow for 200 end users.Based on the docs provided, your options are: 1. Use the UI with an Owner/Admin account
Under Organization Settings → Users & Teams, select multiple users and click Delete to remove them from the organization (this removes them from all projects and teams). [Roles overview] 2. If these are actually service accounts, then you can automate via a service account:
- List org service accounts (endpoint not fully shown here but referenced as part of the Service Accounts API) [Service Accounts overview]
- Call DELETE /organizations/{organizationId}/service-accounts/{serviceAccountId} in a script for each of the 200 IDs. [Delete service account]
If you truly need to bulk-remove human users from the organization via API, the knowledge sources don’t document a supported method; you’d need to use the UI or contact Mixpanel Support / your CSM to confirm if there is an internal or non-public API for that.
kapa.ai is still learning and improving, please let me know how I did by reacting below.
ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
