Deleting Bulk Users
Hey @Rajat , I am in need to clean up unwanted/unused users created in zitadel. It is actually 3 digit count, which means manually deleting each user will be difficult and time taking process.
I directly accessed db and deleted the users with certain key using dbquery, but yet I can see those users listed in the console. By search I got to know like as zitadel is event based so it will be displayed based on the event. This db query check I have done in another instance not in the actual instance.
Is there any ways to handle this?
6 Replies
hey @Kanimozhi direct DB deletion wonβt work in ZITADEL because itβs an event-sourced system,data is rebuilt from events, not direct table rows π
you need to search/list your unwanted/unused users and then delete then run a loop and delete them
this will store a new "user removed" event and performs cleanup.
Yeah, Thanks @Rajat . Actually I have wrote a script to get and delete the users in loop.
hey @Kanimozhi awesome!!. Please mark my answer with β
and it will auto close the question π
I tried to mark solution with β
, but is saying not enabled.
hey @Kanimozhi its okay, I marked it solved π
Thanks @Rajat Singh π