I've been googling around, reading the google cloud platform docs but can't find the answer to bulk deleting users from the Identity Platform.
We have a dev application that we use for testing. We want to remove all authenticated users and start fresh. See below the image where I multi select and get no option to delete all the users.
I've searched for gcloud cli commands to do this but with no luck, the documentation on this functionality is not well surfaced.
I would be happy with answers to:
- Bulk delete through the G cloud UI
- Delete ALL authenticated users through gcloud cli
- Delete all users per tenant
You can make use of the Identity Toolkit API for bulk deleting users.
If you read through the Admin APIs guide for Identity Platform on Google Cloud, you will also notice that they recommend using the Admin APIs for user management.
What you are looking for is:
projects.accounts.lookup
for looking up all users (orprojects.tenants.accounts.lookup
if you want to look up for a specific tenant).projects.accounts.bachDelete
for bulk-deleting users in your project (orprojects.tenants.accounts.batchDelete
if you want to target a specific tenant).