Currently, we are using the nickname to search for users so that we can figure out the generated userId and then delete the user. We can remove the search API call, and directly delete all users based on the userId, as we know how the userId looks like. However, if we are in the deactivate-only mode we do not know the userid and have to search for the users, based on the mail address.
Description
There is a new API -> https://zitadel.com/docs/apis/resources/user_service_v2/user-service-add-human-user. This API would allow us to combine the create user & add metadata into one api call. It would also remove the nickname workaround, as we will be able to generate our own userId.
userId
An example API call might look like this:
Deactivate / delete
Currently, we are using the nickname to search for users so that we can figure out the generated userId and then delete the user. We can remove the search API call, and directly delete all users based on the userId, as we know how the userId looks like. However, if we are in the deactivate-only mode we do not know the userid and have to search for the users, based on the mail address.