User migration between Organizations
Good day! While working with Zitadel (Self-hosted, version 4.1.0), we encountered the following issue: the client is requesting to move all users from one organization to another without changing their passwords.
When we previously migrated users from the old database (Django + Postgres), we used the *import *endpoint, which allowed us to transfer user passwords hashed with PBKDF2 into Zitadel.
However, as far as I understand, Zitadel currently does not support changing a user's organization, nor is it possible to recreate a user with their existing password hash.
The question is: what is the recommended approach in such a case?
1 Reply
Hi @notfoundium, I'm an AI assistant for ZITADEL. While a team member reviews this question, I'll see if I can find relevant sources for your question.
Answer
You are correct that ZITADEL does not currently support directly moving a user from one organization to another via a dedicated API or feature (1) (2) . The common workaround is to:
1. Export the user data from the source organization (using the export endpoint) .
2. Delete the user(s) from the original organization.
3. Re-import the user(s) into the new organization, including their existing password hash.
If you have the original password hash (such as PBKDF2) , you can use the import endpoint to recreate the user in the new organization with the same password hash, provided the hash format is supported and encoded correctly (3) (4) . The import payload should specify the password hash and algorithm for each user.
There is no built-in method to transfer users between organizations without this export-delete-import cycle, and this process is the currently recommended approach according to available information (1) (2) .
To learn more, see the sources I considered:
[1] API request to move user to different organization
[2] User Migration between Organizations
[3] Migrate Users
[4] How to migrate a user with pbkdf2 (ASP.NET Core) hashed password?
Feel free to tag @Ask Inkeep with additional questions.
Glad I could be helpful. Feel free to create a new thread with any new questions you may have.