Skip to content

Auth0 to Keycloak user converter

Turn an Auth0 user export into a Keycloak import file: emails, names, metadata as attributes, groups, and a set-password step for every password user.

Runs in your browser. Nothing you paste is sent to us.

Auth0 export

The JSON file of an Auth0 user export job: one user per line. Made-up users are filled in. It stays in your browser.

Falls back to the other when a user has none. Usernames are written in lower case.

Where your users’ groups live, such as app_metadata.groups or app_metadata.roles. Leave it empty for none.

Output

Keycloak users

3 users 2 set a new password 1 sign in with a provider

Records read
3
Users in the file
3
Left out
0
Set a new password by email link
2Marked with the Update Password required action
Social or enterprise sign-in only
1Re-link by email at their first sign-in
Disabled in the source
1
In groups
2/staff, /staff/support
Attributes
3auth0_user_id, locale, plan
Password hashes left out
0Keycloak cannot verify them, so the file never holds them
JSON
{
  "groups": [
    {
      "name": "staff",
      "subGroups": [
        {
          "name": "support",
          "subGroups": []
        }
      ]
    }
  ],
  "users": [
    {
      "username": "[email protected]",
      "email": "[email protected]",
      "emailVerified": true,
      "firstName": "Sample",
      "lastName": "One",
      "enabled": true,
      "createdTimestamp": 1709370900000,
      "attributes": {
        "plan": [
          "pro"
        ],
        "locale": [
          "en-US"
        ],
        "auth0_user_id": [
          "auth0|sample001"
        ]
      },
      "groups": [
        "/staff"
      ],
      "requiredActions": [
        "UPDATE_PASSWORD"
      ]
    },
    {
      "username": "[email protected]",
      "email": "[email protected]",
      "emailVerified": true,
      "firstName": "Sample",
      "lastName": "Two",
      "enabled": true,
      "attributes": {
        "auth0_user_id": [
          "google-oauth2|100000000000000000002"
        ]
      },
      "groups": [
        "/staff/support"
      ]
    },
    {
      "username": "[email protected]",
      "email": "[email protected]",
      "emailVerified": false,
      "enabled": false,
      "attributes": {
        "auth0_user_id": [
          "auth0|sample003"
        ]
      },
      "requiredActions": [
        "UPDATE_PASSWORD"
      ]
    }
  ]
}
Read but not carried over
  • identities: Used to tell password users from social ones, then left out.
  • password_hash, passwordHash: Keycloak cannot verify this hash, so it is left out.
  • mfa_factors: MFA secrets are not in this export; users enroll again.
  • last_login, logins_count, updated_at: Sign-in history does not move.
In the admin console: Realm settings, Action, Partial import. Choose Skip or Fail for users that already exist. Keycloak keeps only attributes its user profile declares, unless the realm allows unmanaged attributes: add them to the user profile first.

How to use it

  1. Run a user export job in Auth0 in JSON format, or paste a JSON array of users.
  2. Name the field that holds groups, such as app_metadata.groups.
  3. Choose the username and the output: partial import or realm import file.
  4. Read the summary, then save the file and import it into a staging realm.

What to know

Auth0 keeps database passwords as bcrypt hashes and gives them out only through a support request. Keycloak ships no bcrypt verifier, so the file never holds a hash: password users get the Update Password required action and set a new password by email link.

Users who sign in only with Google or another connection get no password step. They sign in with the same provider in Keycloak, which finds the account by email and asks them to confirm the link.

user_metadata and app_metadata become user attributes. Declare them in the realm’s user profile before the import, or Keycloak drops them.

Moving users from Auth0 to Keycloak

Auth0 and Keycloak describe a user in much the same way: an id, an email address, a verified flag, names, some custom data and the ways the person signs in. The files look different, though. Auth0 exports users as newline-delimited JSON with its own field names, and Keycloak imports users as one JSON document in the shape of its realm export.

This converter reads the Auth0 export and writes the Keycloak file. It runs in your browser, so the export never leaves your computer. It writes no password and no hash, and it tells you, user by user, who will have to set a new password and who signs in through a provider and only needs to confirm a link.

The page explains what Auth0 exports, what Keycloak accepts, what the tool does with each field, and the decisions you still make yourself. For the whole move, from inventory to rollback, see moving from Auth0.

Getting the export out of Auth0

Auth0 has two kinds of export, and they hold different things.

ExportHow you get itWhat it holds
User export jobAn export job, started in the dashboard or with the Management APIProfile fields you choose, in JSON (one user per line) or CSV
Password hash exportA support case, with your tenant name, a PGP public key and a signed acknowledgment formPassword hashes, and MFA secrets if you ask for them; Auth0 reviews each request

For this tool you need only the first one. Ask for the JSON format, not CSV: Auth0’s CSV export cannot hold app_metadata or user_metadata as whole objects, and the JSON keeps them. Turn on the default fields, which follow Auth0’s normalized user profile: user_id, email, email_verified, given_name, family_name, name, nickname, username, blocked, identities, created_at, user_metadata and app_metadata.

The export job is not available on Auth0’s free plan, and Auth0 does not promise when a password hash export will be ready. Plan the user export early, and do not wait for the hash export: Keycloak cannot use it, as the next section explains.

Why passwords do not move

Auth0’s own documentation says database passwords are hashed with bcrypt. Keycloak verifies passwords with the hash providers it ships: Argon2, and PBKDF2 with SHA-512, SHA-256 or SHA-1. It has no bcrypt provider. A bcrypt hash imported as a Keycloak credential would not verify, and the user could not sign in with it.

Keycloak does let a developer add a hash provider of their own. RealmDeploy clusters run the stock Keycloak image with no custom providers, so that route is closed today. We are evaluating a bcrypt provider; until one exists on our clusters, Auth0 database users set a new password by email link after the move.

That is why the tool leaves every hash field out, even if your file has one. A hash that cannot be used is still sensitive data, and a file without it is safer to keep for a dry run.

Passwordless users (Auth0’s email and sms connections) have no password at all. The tool treats them like password users, so they get a set-password link, which works on every realm. If you would rather keep them passwordless, turn on passkeys in the realm and change their required action.

What the tool does with each field

Auth0 fieldKeycloak userNotes
emailemail, in lower caseAlso the username by default
email_verifiedemailVerifiedKept as it was
given_name, family_namefirstName, lastNameFrom name when both are empty
usernameusername when you choose the idFalls back to user_id
blockedenabled: falseOr left out, if you choose
created_atcreatedTimestampMilliseconds since 1970
user_idThe auth0_user_id attributeUseful to match records later
app_metadata, user_metadataUser attributesNested objects become dotted names
The groups field you namegroups, as pathsSuch as /staff/support
identitiesWho sets a password, who re-linksNot written to the file

Fields with no place in Keycloak are listed in the result under “Read but not carried over”: identities, any password hash fields, mfa_factors, and sign-in history such as last_login and logins_count.

Password users and provider users

Each Auth0 user has one or more identities. An identity with the auth0 provider is a database user with a password. An identity with a provider such as google-oauth2, github or samlp is a social or enterprise sign-in.

A user with a database identity gets the UPDATE_PASSWORD required action. A user with only provider identities does not: they keep signing in with Google or their company’s identity provider, once you set that provider up in Keycloak. On the first sign-in, Keycloak’s first broker login flow finds the existing account with the same email and asks the user to confirm the link, by email or by signing in. The summary counts both kinds.

Groups and roles

Auth0 has no groups in the user profile. Teams often keep them in app_metadata.groups or app_metadata.roles, or in Auth0’s Authorization Core roles, which the export does not include. Name the field your tenant uses. A list becomes group paths; a string with commas or semicolons works too.

Keep the field out of attributes, so a group does not also appear as an attribute: the tool does this for the field you name. If your apps read roles from tokens, map the groups to Keycloak roles in the realm, and add a mapper so the token carries them the way your apps expect.

The file the tool writes

Sample output for one made-up user
{
  "groups": [{ "name": "staff", "subGroups": [] }],
  "users": [
    {
      "username": "[email protected]",
      "email": "[email protected]",
      "emailVerified": true,
      "firstName": "Sample",
      "lastName": "One",
      "enabled": true,
      "createdTimestamp": 1709370900000,
      "attributes": {
        "plan": ["pro"],
        "locale": ["en-US"],
        "auth0_user_id": ["auth0|sample001"]
      },
      "groups": ["/staff"],
      "requiredActions": ["UPDATE_PASSWORD"]
    }
  ]
}

Partial import adds the users, and the groups they belong to, to an existing realm. The realm import file adds a realm name and suits a new realm started with --import-realm. Both are the format Keycloak’s own export uses.

The page shows the first 20 users as a preview. The saved file has every user, so a large export does not slow the page down.

Before you import

  1. Declare the attributes in the realm’s user profile (Realm settings, User profile). Keycloak drops attributes it does not know, unless unmanaged attributes are enabled.
  2. Set up the realm’s SMTP connection, so the set-password emails can go out.
  3. Create the identity providers your social users need, with the same alias you will register at Google or the other provider.
  4. Import into a staging realm first, and compare counts with the summary.
  5. Sign in as a social test user and as a password test user, end to end.

After the import into production, send the set-password emails. In the admin console that is a user’s Credentials tab, Credential reset, Update Password, Send email. For many users, the admin REST API’s execute-actions-email endpoint does the same, with a link lifetime you choose. The migration email templates help you tell users first.

Send the set-password email to one user with kcadm
kcadm.sh update users/<user-id>/execute-actions-email \
  -r <realm> -n -b '["UPDATE_PASSWORD"]' -q lifespan=86400

Mistakes to avoid

  • Importing a bcrypt hash as a Keycloak credential. It will not verify, and users will see a wrong-password error instead of a set-password link.
  • Using user_id as the username without thinking. Auth0 ids contain a |, which the tool turns into a dash; the email address is usually the better username.
  • Forgetting duplicate emails. Auth0 can hold the same email in two connections. Keycloak realms usually refuse that, so the tool keeps the first and lists the rest.
  • Sending set-password emails before the realm’s SMTP and the email text are tested on staging.
  • Keeping the export after the move. Delete every copy once you have signed off.

Where we come in

On Premium and Enterprise, our team does the move with you, using the plan’s 10 service hours a month: we convert, import into a staging copy, and help you test. On Starter you use these tools and the guides, and we answer questions in writing. A very large move is scoped as a Custom plan through the contact form. The readiness checklist lists every step for an Auth0 move.

Questions

Frequently asked questions

Can Auth0 users keep their passwords after moving to Keycloak?

Not today. Auth0 hashes passwords with bcrypt and Keycloak has no bcrypt provider, so users set a new password by email link. We are evaluating a bcrypt provider for our clusters.

Do I need Auth0’s password hash export?

No. Keycloak cannot verify the hashes, so the move works from the ordinary user export job alone.

Which Auth0 export format should I use?

JSON. It is newline-delimited, keeps app_metadata and user_metadata whole, and the tool reads it as it comes.

What happens to users who sign in with Google?

They get no password step. Once the Google identity provider is set up in Keycloak, their first sign-in finds the account by email and asks them to confirm the link.

Does MFA move from Auth0?

The converter does not move MFA. Auth0 may export MFA secrets on an approved request, but plan for users to enroll their authenticator again.

Is my export sent anywhere?

No. It is read and converted in your browser, and the saved file is created on your computer.

Where do Auth0 roles go?

Auth0’s role assignments are not in the user export. Put role or group names in app_metadata, name that field here, and map the groups to Keycloak roles.

Rather not run Keycloak yourself?

We run it for you on a cluster of your own, with backups, upgrades and written support. Starter and Premium begin with a 7-day trial.