Importing password hashes into Zitadel without a forced reset
If your team is leaving a custom or legacy user store and wants users to keep their existing passwords, Zitadel can import existing password hashes in supported algorithms, validate them at first login, and then rehash them, so the work depends mostly on which hash algorithm your legacy system uses and on whether that system can export its hashes at all. Zitadel's hasher supports argon2, bcrypt, md5, pbkdf2, phpass and scrypt, but only bcrypt is enabled for imports by default. Any other algorithm is a scope question to confirm with Zitadel for your version before you commit to a no-reset plan.
Start by inventorying what the legacy store actually holds. For each user record, identify the algorithm, the cost or iteration parameters, the salt format and whether the stored string is self-describing, because a verifier needs all of these to recompute a match. Confirm that the export contains the hash itself and not a placeholder, and check whether the store also holds one-time password seeds or passkey public keys, which Zitadel's import accepts. Where the algorithm is outside the default import set, ask the vendor or your own engineers whether it can be enabled and tested against a sample of real hashes in a non-production instance before the migration is scheduled.
Plan for the users who cannot be covered by a hash import. Accounts whose hashes use an unsupported algorithm, or whose exports are incomplete, will need a forced reset, a just-in-time approach, or a bridge period, and that decision affects the cutover timeline and the support load. Record the decision per algorithm and per user population, and agree with your security and compliance owners how the imported hashes will be handled and retired once users have logged in, since the legacy store and its exports will themselves need controlled deletion.
Which legacy user data maps cleanly into Zitadel
This table compares common legacy user attributes and credentials against what Zitadel's import supports, so you can see which data moves as-is and which needs a mapping decision first. Read each row against your own legacy store, and treat any algorithm not in the supported list as a blocker for a password-preserving import. The main takeaway is that password hashes move only in supported algorithms, while roles and groups always need a design decision before import.
| Legacy data | Zitadel import support | What to decide or confirm |
|---|---|---|
| Bcrypt password hashes | Supported; enabled for imports by default | Confirm your cost factor and hash prefix format match what the verifier expects in your test import |
| Argon2, md5, pbkdf2, phpass, scrypt hashes | Supported by the hasher, but not enabled for imports by default | Enable each algorithm deliberately and test a sample of real hashes at first login before bulk import |
| Hashes in any other or custom scheme | Not in the supported list | Plan forced password resets, or a just-in-time migration that verifies against the legacy system |
| OTP seeds | Accepted in the import | Confirm the seed format, digits, period and algorithm match Zitadel's expectations before importing |
| Passkey public keys | Accepted in the import | Confirm credential IDs and the relying party ID still match your Zitadel domain, since passkeys are bound to it |
| Profile fields (name, email, phone) | Mapped as user attributes during import | Decide which email addresses are verified, and how duplicate or missing emails are resolved |
| Roles and groups | Not a direct import concept; map to grants | Decide which roles become project roles and grants, and which organization each user belongs to |
How the hash algorithm decides the import path
Some legacy stores already keep passwords in an algorithm Zitadel's hasher supports and has enabled for imports. Zitadel's hasher supports argon2, bcrypt, md5, pbkdf2, phpass and scrypt, but only bcrypt is enabled for imports by default. If your hashes are bcrypt, the import path is the most direct: the hash is loaded with the user record, and the password is checked at the user's first login by a verifier that then rewrites the stored hash in Zitadel's own format. The user keeps their existing password and is not asked to reset it.
- Confirm the exact variant: bcrypt has several prefixes and cost settings, so check the stored string format, not just the family name.
- Map the full record: the hash, the user's login name and email must all be exported together so the verifier finds the right account.
- Plan for first-login checks: each user's first sign-in runs the verifier, so the rehash happens gradually rather than in one batch.
- Test with real samples: import a small set of accounts from each password generation and log in with a known password before the full run.
- Ask for the import tooling: confirm with Zitadel what the bulk import expects for the bcrypt format your store produces.
Before committing, check that your algorithm and its parameters match the supported list in the vendor's secrets documentation.
Hashes in argon2, md5, pbkdf2, phpass or scrypt are supported by the hasher, but they are not enabled for imports by default. Enabling an algorithm for imports is a configuration decision on your Zitadel instance, and it changes what your team must own afterwards. Each enabled algorithm needs to be understood, tested and kept in the configuration for as long as legacy hashes remain in use. Weaker algorithms, such as md5 in many deployments, should be treated as a migration risk rather than a comfortable default, and the cost of verifying them should be weighed against the value of keeping users' passwords.
- Decide the scope: enable only the algorithms your inventory actually contains, and document why each one is on.
- Verify parameters: confirm iteration counts, salts and encodings against your legacy system before import.
- Assess the security trade-off: a legacy algorithm that is weak in isolation still protects passwords until users rehash, so set a clear end date.
- Plan a re-hash path: verifiers upgrade stored hashes at first login, so measure how many accounts remain on the old format over time.
- Review with security: have your security team approve the enabled list as part of the change record.
Confirm with the vendor how enabling an algorithm is set on your deployment and whether it is covered by your support terms.
Some hashes are in an algorithm Zitadel does not list as supported, or they are stored in a form that cannot be exported with the parameters a verifier needs. Examples include proprietary or application-specific hashing schemes, salted constructions that are not documented, and hashes that the legacy vendor will not disclose. For these users, the direct import path is closed, and you must choose a fallback. Do not promise support for algorithms outside the supported list, and do not attempt to convert them by guessing at formats.
- Forced reset: users are loaded without a usable password and must set a new one, which is simple but disruptive for large populations.
- Just-in-time migration: the legacy system stays live during a grace period, and Zitadel calls it at login to verify the password and create the user.
- Mixed approach: importable users move in bulk, and the remainder move through a reset or just-in-time path.
- Communicate early: tell application owners and users which path applies, since resets generate support volume.
- Set a cut-over criterion: define when the legacy store is switched off and who signs off that decision.
For help choosing between these fallbacks, see the Zitadel migration users guide and confirm the specifics with the vendor for your version.
How a legacy hash moves through import and first login
The flow starts in the legacy user store, where an export produces a file holding user records, password hashes, OTP seeds and passkey public keys. That file is transformed into Zitadel's import format and loaded into a Zitadel organization, which is the first trust boundary to watch. At first login, the verifier checks the imported hash against the password the user types, and on success Zitadel stores a fresh hash so the legacy hash is no longer needed. Check that the export file is protected and deleted after import, and that only the algorithms you intend to accept are enabled.
Hash, OTP seed and passkey key path from legacy store to first login.
Documented import paths and what each one needs
Zitadel documents a bulk import path for users with password hashes, API calls that create users and set credentials, and a secrets configuration that decides which hash algorithms the instance accepts. Each path asks something different of the team, from admin access to export formats and API tokens. Confirm every format and field name against the documentation for the Zitadel version you run before you build the export.
Bulk import through the migrate users guide
The migrate users guide describes importing existing users in bulk, including their password hashes, validating those hashes with verifiers at first login, and accepting OTP seeds and passkey public keys. The team needs an export from the legacy store in a shape the import expects, and an administrator who can run the import against the target organization. Check the file layout, the accepted hash labels and whether the import runs per organization or per instance for your version. Confirm these details in the guide before writing the conversion script.
Migrate users guideCreating users and credentials through the APIs
Some teams skip the bulk file and create each user through Zitadel's APIs, then set credentials separately. This path suits small populations or staged loads, but it needs a service account with a token that has the rights to create users and manage their authentication methods. Plan rate handling and retries, and record which user IDs map to which legacy accounts so later logins and reconciliation are traceable. Confirm the endpoints and required scopes for your version in the API documentation.
APIs introductionEnabling hash algorithms in secrets configuration
Zitadel's hasher supports several algorithms, but only bcrypt is enabled for imports by default. Any other algorithm in your legacy store, such as scrypt, pbkdf2 or argon2, requires a deliberate change to the secrets configuration before the import, and that change belongs in your deployment configuration under change control. Someone with operator access to the self-hosted instance must make and review it. Confirm the configuration key names and the restart or reload behavior for your version.
Secrets documentationMapping the hash format to the algorithm
An exported hash only verifies if Zitadel knows its algorithm and parameters. Legacy systems often store cost factors, salts or iteration counts in a combined string, and a mismatch causes every login to fail at the verifier. Test a sample of accounts from each hash family against a non-production instance before the full run. Record the exact parameters from the legacy system, since they cannot be recovered from the hash alone.
Admin access and API tokens on the target
Every path requires privileged access to the target Zitadel. Use a dedicated administrator account or service user with the narrowest rights that complete the import, and rotate or revoke its token after the run. Keep the token out of shell history, CI logs and shared documents. Ask who approves the import window and who can see imported personal data while it runs. Confirm the exact role names in the documentation for your version.
Testing the path before production
Run each documented path against a copy of production users in a separate instance or staging deployment. Compare counts, login results across each hash family, OTP enrollment and passkey sign-in with the legacy system. Keep the test export out of shared storage and delete it when testing ends. Agree the pass criteria in writing before the rehearsal, so the production run is a repeat rather than a first attempt.
Sequence for a pilot, parallel run and cutover
This sequence moves password-hash imports from a planned test to a production cutover, with a checkpoint at each phase so that every move to the next phase rests on evidence rather than assumption. The output is a documented decision on whether the legacy store can be retired.
Inventory hash algorithms and user counts
Before anything is imported, the source team lists every hash format in the legacy store, the number of users under each format, and any users with OTP seeds or registered passkeys. Mixed or custom schemes, such as a hash wrapped in another hash or a salt stored in a separate table, are flagged for conversion or exclusion. The check that closes this step is a reconciled table where the per-algorithm counts add up to the total user count in the source, confirmed by both the identity owner and the data owner.
Match each format to a supported algorithm
The team compares the inventory against the algorithms Zitadel's hasher supports, which are argon2, bcrypt, md5, pbkdf2, phpass and scrypt. Only bcrypt is enabled for imports by default, so every other algorithm needs a deliberate decision to enable it in the target instance, with the security owner signing off on the trade-off. Formats that match no supported algorithm are routed to a forced reset or a just-in-time approach. The output is a mapping from each source format to an algorithm and an owner for each exception.
Enable the needed algorithm in a test instance
Your platform engineers enable only the algorithms the inventory requires in a non-production Zitadel instance built from the same configuration as production. They then import a small set of synthetic test accounts, one per hash format, and confirm that each one authenticates with its known password and that a wrong password is rejected. The step is done when every format in the mapping has passed a login test in the test instance and the configuration change is recorded in version control.
Run a pilot import with a small group
The team selects a small group of real users from one format, imports them with the bulk import process, and confirms that the accounts appear in the intended organization with the expected roles, verified email addresses and passkey or OTP enrollments. Each pilot user logs in once, and the verifier writes an upgraded hash on success. The check is a reconciliation report showing imported, failed and skipped counts, with every failure explained, and a sample of logins recorded in the audit trail.
Operate a parallel run with the legacy store as source of truth
During the parallel run, the legacy store stays authoritative. Users who are migrated keep their existing passwords, and any password change, account lock or deactivation must be replicated to Zitadel through an agreed process until cutover. Support staff use a runbook that states which system to check when a user reports a problem. The run is complete when login success rates, lockout events and account state differences between the two stores have been reviewed over a period agreed by the owners and no unexplained mismatch remains open.
Set and agree cutover criteria
Before cutover, the migration owner, security lead and application owners agree in writing on the conditions for switching the source of truth. Typical criteria cover full reconciliation of user counts, zero open mismatch tickets, verified login paths for every application, a tested rollback that returns authority to the legacy store, and a named approver. The output is a signed go or no-go record that lists each criterion and the evidence attached to it.
Execute cutover and confirm with a rollback test
On the cutover date, the team makes Zitadel the authority for authentication, repoints applications, and freezes writes to the legacy store. They run a scripted set of login checks across applications and roles, then confirm that the rollback path works in a controlled way before the legacy store is left read-only. The step closes when the post-cutover checks pass and the monitoring for failed logins has been reviewed without a pattern that points to a hash or configuration fault.
Decommission the legacy store on evidence
The legacy user store is retired only after a defined observation period passes without an unresolved authentication issue, and after the data retention rules for the old store are applied and the export archive is stored under the controls your compliance team requires. Access to the legacy store is removed, its credentials are rotated, and the decommissioning record is filed. The final output is a signed closure record that names the retained archive, its location and the owner responsible for it.
What happens to passwords after the first successful login
The point to settle before cut-over is that a successful login should retire the legacy hash, not carry it forward indefinitely. When a user submits a password, the verifier checks it against the imported hash using the algorithm that came with the record, such as bcrypt, pbkdf2 or scrypt. A match signs the user in. The stored credential should then be replaced by one produced by Zitadel's own hasher under its current settings. The secrets documentation lists the hasher algorithms, and the weak legacy algorithms you are moving away from should no longer be the long-term form of the secret. Auditors will ask which algorithm protects stored credentials, when that changed and how you know. Confirm the exact replacement behavior for your Zitadel version before you describe it in a control narrative.
The upgrade only covers users who log in. Accounts that stay dormant keep the imported hash indefinitely, so the old algorithm remains in the store for them. Decide early how to handle this: a forced reset for accounts inactive past a cut-off date, a planned retirement of the verifier, or a documented exception with a named owner. Also confirm whether the imported hash is overwritten or kept alongside the new one, and whether changing the import algorithm settings affects records that already exist. Only bcrypt is enabled for imports by default, so enabling md5, phpass or another weak algorithm should be a recorded, approved change, with the reason and an end date written down.
Test this behavior in a pilot before any production batch. Create test users in a non-production instance, with one set for each source algorithm you need, using hashes generated by the same tool that produced your export. For each user, record the stored credential representation, log in once with the correct password, and record it again. Then repeat the login, attempt a wrong password, and confirm that failed attempts do not alter the record. Keep the before and after evidence, the settings in force and the Zitadel version together with the migration record, because an assessor will expect to see them. Repeat the checks on the version you will run in production, since behavior can change between releases. The migration guide for users describes the import steps to follow alongside this test.
What drives the cost and duration of a hash import
This table compares the cost components of a password hash import, who is paid for each, and whether the effort is one-time or recurring. Read it as a checklist for scoping and for questions to put to a partner or your own team before a quote is agreed.
| Driver | Why it changes cost or effort | What to ask for in a quote |
|---|---|---|
| Hash algorithms in use | Each algorithm needs its own import path and verification. Zitadel's hasher supports argon2, bcrypt, md5, pbkdf2, phpass and scrypt, but only bcrypt is enabled for imports by default, so other algorithms need explicit enablement and testing. | Inventory of every algorithm, cost parameter and salt format, with the plan to enable each one |
| Whether the legacy export includes hashes | If the source will not export hashes, users may need forced resets or a just-in-time approach, which changes the build and the user-facing work. | Written confirmation of what the source export contains, and the fallback path if hashes are missing |
| Number of users and organizations | Volume drives batch runtime, reconciliation and error handling. Each Zitadel organization needs its own user mapping and login settings. | Import volume by organization, batch size assumptions and the reconciliation report format |
| OTP seeds and passkey public keys | Seeds and public keys are extra data to map and validate. Their volume and format affect the import script and the verification of enrolled factors. | Count of users with OTP or passkeys, and how each factor is validated after import |
| Role and grant mapping | Legacy roles must be mapped to Zitadel projects, roles and grants. Each mapping decision needs review by the application owners. | Role map document, owner sign-off steps and who maintains the map after cut-over |
| Application repointing | Each application's login configuration, client settings and redirect URIs change. Effort rises with the number of applications and integrations. | List of applications, their protocols and the repointing work for each |
| Login flow testing | Testing covers each algorithm, factor type and organization, including the first-login upgrade of hashes. This is usually the largest verification effort. | Test matrix, environments used and the defect handling process |
| One-time versus recurring work | Mapping, import tooling, cut-over and initial testing are one-time. Hash verifier monitoring, support for failed logins and any retained legacy store are recurring until decommissioning. | Split of one-time and recurring items, and the end date for running the legacy store |
Questions teams ask before importing password hashes into Zitadel
Can our team run a password hash import into Zitadel without outside help?
Yes, if your team has someone comfortable with PostgreSQL, a self-hosted Zitadel deployment and scripting for exports and conversions. The import itself is supported by Zitadel's migration guide, so the work is mostly planning the source export, mapping users to organizations, and testing logins. Teams without that mix usually find the hardest part is verifying that every legacy hash converts correctly and that no account gets locked out at cut-over. Ask a partner to quote only the parts you cannot cover internally, such as test design, cut-over support or the security review of the import path.
What drives the cost and effort of a password hash import?
The main drivers are the number of user stores you are merging, how many distinct hash algorithms and salt formats they use, how many organizations or realms map into Zitadel, and whether you need to carry over OTP seeds or passkey public keys. Each adds export work, conversion testing and login verification. One-time costs cover scoping, scripting, the test cycle and cut-over. Recurring costs are small by comparison and come from running Zitadel itself. Ask any quote to itemize export, conversion, testing and cut-over separately.
How long does a password hash import usually take?
The duration depends on user volume, how many sources you have, how many algorithms need handling and how much testing your change process requires. Zitadel's documentation does not give a general timeline for this work, so treat any single number as a guess until your own inventory is complete. A practical approach is to inventory hash formats first, run the import against a copy of production data in a non-production instance, then schedule the cut-over around your change windows. Ask for a written schedule that lists each gate before work starts.
What do we need to provide for a password hash import?
You will need a full export of the user store with usernames, email addresses, password hashes, salts and any algorithm parameters, plus the hashing configuration from the legacy system. You also need admin access to the target self-hosted Zitadel instance, a non-production instance for testing, and a set of test users covering each hash algorithm, each organization and users with MFA. Confirm with your legacy system vendor that the export format is complete, and confirm with your security team how exported hashes will be stored and deleted after the import.
What happens if our legacy password hash algorithm is not supported?
Zitadel's hasher supports argon2, bcrypt, md5, pbkdf2, phpass and scrypt, and only bcrypt is enabled for imports by default. If your legacy algorithm is outside that list, or uses non-standard parameters, a direct hash import will not work as is. The usual options are to enable a supported algorithm in your configuration after review, to re-hash on a trusted system you control, or to move users just-in-time or with forced password resets. Confirm the algorithm and parameters with your source system before choosing, because the wrong choice can lock users out.
Do OTP seeds and passkeys come across in the import?
Zitadel's migration guide states that imports can include OTP seeds and passkey public keys, so you do not need to force every user to re-enroll if your source exports them. Check three things before relying on it: that your legacy system can export the seeds and public keys in a usable form, that the secrets are handled under your encryption and retention rules, and that you test a login with each factor type. Passkey private keys never leave the user's authenticator, so a passkey import only moves the public key. Users with factors you cannot export will need to re-enroll.
Will users notice the change after the import?
Users with imported bcrypt hashes can sign in with their existing passwords, and verifiers check the hash at first login. Zitadel's guide describes that the hash is validated at first login, which is the point where the stored credential can be upgraded. Users should see the same password and no reset prompt, but they may see a new login page or new MFA prompts if your Zitadel branding or policies differ from the legacy system. Plan a short user communication and a support queue for the first days after cut-over.
Where hash imports usually go wrong
Most failed password hash imports trace back to a short list of causes: the algorithm, the completeness of the export, the parameters that come with each hash, and the identifiers used to match accounts. Each risk below has a prevention step you can build into the migration plan before the first batch runs, and most of them are cheap to catch in a dry run against a copy of the data.
Algorithm not enabled for import
Zitadel's hasher supports argon2, bcrypt, md5, pbkdf2, phpass and scrypt, but only bcrypt is enabled for imports by default. If your legacy store uses argon2, pbkdf2 or scrypt, those hashes will not import until the algorithm is enabled in the instance configuration. Before exporting, identify the exact algorithm and its parameters for every hash format in your store, then confirm with a test user that the matching verifier is active in the target instance.
Zitadel secrets docsIncomplete exports missing hashes
Some accounts may have no password hash in the export because they signed in through a social or enterprise provider, were created by an admin without a password, or were never reset after a store migration. Compare the count of exported user records with the count of records that have a hash field populated. Decide in advance how accounts without hashes are handled, such as importing them without a password and sending a reset link, so they do not fail silently.
Salts and parameters lost in conversion
Many hash formats store the salt, cost factor, iteration count or memory settings alongside the digest. A conversion script that keeps only the digest will produce hashes that never verify. Check that each imported value carries every parameter the verifier needs, and test a sample of users from each hash format and parameter set in a non-production instance before the full run.
Weak hashes that never upgrade
A verifier upgrades a hash only when the user logs in. Accounts that never sign in keep their original, possibly weak, hash indefinitely. Decide how long legacy hashes stay in the instance, whether to force resets for dormant accounts, and whether weak algorithms such as md5 should be imported at all. Record the count of accounts still on legacy hashes so the retirement date is based on data, not assumption.
OTP seeds and passkeys mis-mapped
OTP seeds and passkey public keys can be imported, but a seed or key attached to the wrong user account gives that person a second factor they cannot use, or lets someone else pass a second-factor check. Map each seed and key to the user identifier by a stable key, not by row order, and confirm the MFA method type matches the source. Test one OTP login and one passkey login per sample user before cut-over.
Identifiers changing so logins fail
Login depends on the username or email being matched exactly. If the legacy system stores emails in mixed case while the target normalizes them to lowercase, or trims whitespace differently, accounts will import with identifiers that users do not type. Normalize identifiers in the export script using the rules the target applies, detect duplicates that appear after normalization, and run a login check for a sample of accounts with mixed-case addresses.
How DeployOpen scopes and delivers a Zitadel user migration
DeployOpen approaches password hash import as a scoped engagement: first we establish which hash formats and login factors your legacy store actually holds, then we build and verify the import path inside your own infrastructure. Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
How we scope
- Inventory every hash algorithm, salt and cost setting in the legacy user store before choosing an import path
- Confirm which hashers Zitadel can verify and whether bcrypt-only import defaults need changing for your sources
- Record OTP seed and passkey public key handling, with the users and factors each one affects
- Agree in writing the user volumes, cut-over window, fallback behavior and deliverables before any work starts
How we build
- Write and test the export and conversion scripts against a copy of real-format data in a non-production Zitadel instance
- Configure verifiers so hashes upgrade to Zitadel's current format at first successful login
- Run bulk import dry runs and reconcile counts, organizations and role assignments against the source
- Test login paths for password, OTP and passkey users in staging before production runs
How we hand over
- Document the export, conversion and import runbooks with the exact commands and configuration keys used
- Deliver a reconciliation report showing imported, skipped and failed records with the reason for each
- Walk your identity, security and compliance teams through the hash handling and where secrets are stored
- Hand over the decommissioning checklist for the legacy store, including what must be retained as evidence
How we support
- Support the cut-over window and triage login failures caused by hash format or factor mismatches
- Confirm the upgrade-on-login behavior after go-live, so you can see how many users still hold legacy hashes
- Offer ongoing support, upgrades and continuous testing as a retainer after the migration closes
- Agree in writing what post-migration support covers, including who responds to which kinds of issues

