You have two main options to import users’ passwords into Ory: 1) Import hashed or clear-text passwords - If you have hashes in a supported format (e.g., BCrypt, Argon2, PBKDF2, etc.), include them as credentials.password.config.hashed_password when creating or importing identities. This preserves existing passwords so users can log in normally after import. [[Hashed passwords](
https://www.ory.sh/docs/kratos/manage-identities/import-user-accounts-identities#hashed-passwords); [Create identity API](
https://www.ory.sh/docs/reference/api#tag/identity/operation/createIdentity)] - If you only have clear-text passwords, include credentials.password.config.password and Ory will hash them during import (slower for large batches). [[Importing credentials](
https://www.ory.sh/docs/kratos/manage-identities/import-user-accounts-identities#importing-credentials); [Bulk import](
https://www.ory.sh/docs/kratos/manage-identities/import-user-accounts-identities#bulk-import-identities-from-other-providers)] 2) Use the password migration hook (no hashes available or unsupported format) - Import identities with an empty hashed_password and set use_password_migration_hook: true. On the user’s first login, Ory calls your webhook with the identifier and entered password; if your legacy system confirms a match, Ory stores the new hash and completes login. [[Password migration hook](
https://www.ory.sh/docs/kratos/manage-identities/import-user-accounts-identities#password-migration-using-a-web-hook)] Will users be triggered into an Ory login browser flow? - Yes. After import, users authenticate through Ory’s login flow (UI or API). If you imported valid password hashes (or clear-text to be hashed), they can sign in immediately with the same credentials. If using the migration hook, their first login via the Ory flow will trigger the webhook to migrate the password seamlessly. [[Import identities](
https://www.ory.sh/docs/migrate-to-ory#get-user-data-and-credentials); [Password migration hook](
https://www.ory.sh/docs/kratos/manage-identities/import-user-accounts-identities#password-migration-using-a-web-hook)] Notes: - For PBKDF2 imports, ensure the PHC-style format is correct; base64 padding nuances can matter (some users reported needing to trim “==” when composing the string). [[Issue 301](
https://github.com/ory/network/issues/301)] - For bulk imports, use batchPatchIdentities and mind batch limits/timeouts. [[Bulk import](
https://www.ory.sh/docs/kratos/manage-identities/import-user-accounts-identities#bulk-import-identities-from-other-providers); [Migrate to Ory](
https://www.ory.sh/docs/migrate-to-ory#import-identities)]