Migrate from Auth0
This guide covers migrating users, clients, roles, and connections from Auth0 to Idenplane. The migration is performed using Auth0's Management API export format. User role assignments, user and app metadata, and social identity links are not imported.
Prerequisites
Before starting the migration:
- Idenplane installed and running
- Admin API key configured
- Auth0 Management API export file
- Sufficient database storage for migrated data
- Existing realm in Idenplane (target realm is required)
Unlike Keycloak migrations, Auth0 migrations require a target realm to be specified. Create a realm in Idenplane before importing.
Exporting from Auth0
Step 1: Export Data Using Management API
Export the following data from Auth0:
# Export users
curl -s -H "Authorization: Bearer ${AUTH0_TOKEN}" \
"https://${AUTH0_DOMAIN}/api/v2/users?fields=user_id,email,email_verified,username,name,given_name,family_name,blocked,password_hash,custom_password_hash,app_metadata,user_metadata&include_totals=true" \
-o users.json
# Export clients
curl -s -H "Authorization: Bearer ${AUTH0_TOKEN}" \
"https://${AUTH0_DOMAIN}/api/v2/clients?fields=client_id,name,client_secret,app_type,callbacks,allowed_origins,grant_types,token_endpoint_auth_method,is_first_party" \
-o clients.json
# Export roles
curl -s -H "Authorization: Bearer ${AUTH0_TOKEN}" \
"https://${AUTH0_DOMAIN}/api/v2/roles?fields=name,description,permissions" \
-o roles.json
# Export connections
curl -s -H "Authorization: Bearer ${AUTH0_TOKEN}" \
"https://${AUTH0_DOMAIN}/api/v2/connections?fields=name,strategy,enabled_clients,options" \
-o connections.json
Step 2: Combine Export Files
Create a combined export file:
{
"users": [ /* contents of users.json */ ],
"clients": [ /* contents of clients.json */ ],
"roles": [ /* contents of roles.json */ ],
"connections": [ /* contents of connections.json */ ]
}
Step 3: Review Export Contents
The exported JSON contains:
| Section | Description |
|---|---|
users | User accounts with credentials and metadata |
clients | OAuth 2.0 client applications |
roles | Roles with permissions |
connections | Identity provider connections (social/enterprise) |
Exported password hashes depend on Auth0's password hash configuration. See Password Migration for details.
Importing to Idenplane
Step 1: Create Target Realm
Create a realm to import data into:
curl -X POST "http://localhost:3000/admin/realms" \
-H "x-admin-api-key: ${ADMIN_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"name": "my-realm",
"displayName": "My Realm",
"enabled": true
}'
Step 2: Basic Import
Import the Auth0 export:
curl -X POST "http://localhost:3000/admin/migration/auth0" \
-H "x-admin-api-key: ${ADMIN_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"data": '"$(cat auth0-export.json)"',
"targetRealm": "my-realm"
}'
Dry Run Mode
Test the migration without making changes:
curl -X POST "http://localhost:3000/admin/migration/auth0" \
-H "x-admin-api-key: ${ADMIN_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"data": '"$(cat auth0-export.json)"',
"targetRealm": "my-realm",
"dryRun": true
}'
A dry run returns the same report as a real migration but doesn't modify any data.
The endpoint needs a global (super-admin) credential. It accepts a JSON body of up to 10 MB, so a very large export must be imported in batches; see Handling Large Exports.
Migration Report
The migration returns a detailed report:
{
"source": "auth0",
"dryRun": false,
"startedAt": "2026-11-16T10:00:00.000Z",
"completedAt": "2026-11-16T10:00:03.000Z",
"summary": {
"realms": { "created": 0, "skipped": 0, "failed": 0 },
"users": { "created": 450, "skipped": 12, "failed": 2 },
"clients": { "created": 8, "skipped": 2, "failed": 0 },
"roles": { "created": 25, "skipped": 5, "failed": 0 },
"groups": { "created": 0, "skipped": 0, "failed": 0 },
"scopes": { "created": 0, "skipped": 0, "failed": 0 },
"identityProviders": { "created": 5, "skipped": 1, "failed": 0 }
},
"errors": [
{ "entity": "user", "name": "unknown", "error": "No username, email, or user_id" }
],
"warnings": [
{ "entity": "organizations", "message": "3 Auth0 organizations found. Use Idenplane's Organization module to recreate them." },
{ "entity": "connection", "message": "Database connection 'Username-Password-Connection' skipped — Auth0 DB connections don't map to identity providers" }
]
}
Response Fields
| Field | Type | Description |
|---|---|---|
summary.users.created | number | Users successfully created |
summary.users.skipped | number | Users skipped due to conflicts |
summary.users.failed | number | Users that failed to import |
summary.clients.created | number | Clients successfully created |
summary.roles.created | number | Roles successfully created |
summary.identityProviders.created | number | Identity providers created |
Error Reasons
| Entity | Error | Resolution |
|---|---|---|
realm | Realm does not exist (the response is still 200; nothing is imported) | Create the realm first |
user | No username, email, or user_id | Fix export data |
client | (varies) | Check Auth0 export format |
role | (varies) | Check Auth0 export format |
Roles are imported by name and description only. Which users had which role is not imported; assign roles again after the import.
Password Migration
What is carried over
Users keep their Auth0 password: Idenplane imports the hash with its real algorithm and checks it on sign-in (hosted login page and password grant). On the first successful sign-in the hash is replaced with an Argon2id hash, transparently.
The imported password counts as used for the realm's password history (passwordHistoryCount): a user cannot "change" it to the same password, at the first change or the next ones (since 0.13.0).
| Source | Format | Imported as (passwordAlgorithm) |
|---|---|---|
password_hash (Auth0's own export) | bcrypt ($2a$/$2b$/$2y$) | bcrypt |
custom_password_hash, algorithm: "bcrypt" | bcrypt string in hash.value | bcrypt |
custom_password_hash, algorithm: "argon2" | PHC string ($argon2id$v=19$...) in hash.value | argon2 |
custom_password_hash, algorithm: "pbkdf2" | PHC string $pbkdf2-<sha1|sha256|sha512>$i=<iterations>,l=<length>$<salt>$<hash> (base64) in hash.value | pbkdf2-sha1, pbkdf2-sha256 or pbkdf2-sha512 |
Any other custom_password_hash algorithm (hmac, md5, sha256 with a separate salt, ldap…), or a password_hash that is not bcrypt, is not carried over: the user is imported without a password and the migration report has a warning naming them.
How Auth0 Password Hashes Are Exported
Auth0 supports multiple password hash configurations:
// Standard Auth0 export format
{
"password_hash": "bcrypt_hash_here"
}
// Custom password hash configuration
{
"custom_password_hash": {
"algorithm": "bcrypt",
"hash": { "value": "hash_value", "encoding": "utf8" },
"salt": { "value": "salt_value", "position": "suffix" }
}
}
Users Without Password Hashes
Users imported without a password must set a new one: the user resets it at /realms/{realm}/forgot-password (the realm needs working e-mail), or an administrator sets one:
curl -X PUT "http://localhost:3000/admin/realms/my-realm/users/${USER_ID}/reset-password" \
-H "x-admin-api-key: ${ADMIN_API_KEY}" \
-H "Content-Type: application/json" \
-d '{"password": "<new password>"}'
The Management API does not return password hashes; Auth0 provides them on request as a bcrypt export. Merge those hashes into password_hash before you import.
Client Migration
Imported Client Properties
| Property | Mapping |
|---|---|
client_id | Client ID |
name | Client name |
client_secret | Hashed client secret (if present) |
callbacks | Redirect URIs |
allowed_origins | Web origins |
grant_types | OAuth 2.0 grant types |
token_endpoint_auth_method | Client type (public/confidential) |
Grant Type Mapping
| Auth0 Grant | Idenplane Grant |
|---|---|
authorization_code | authorization_code |
client_credentials | client_credentials |
password | password |
refresh_token | refresh_token |
urn:ietf:params:oauth:grant-type:device_code | urn:ietf:params:oauth:grant-type:device_code |
Public vs Confidential Clients
Auth0 token_endpoint_auth_method:
| Auth0 Method | Idenplane Client Type |
|---|---|
none | PUBLIC |
| Other methods | CONFIDENTIAL |
Wildcard Origins
Wildcard web origins (*) are stripped. This is logged in the server log only; it does not appear in the migration report.
Regenerate Client Secrets
After migration, regenerate secrets for confidential clients:
curl -X POST "http://localhost:3000/admin/realms/my-realm/clients/${CLIENT_ID}/regenerate-secret" \
-H "x-admin-api-key: ${ADMIN_API_KEY}"
Response:
{
"clientId": "my-app",
"clientSecret": "b3f1c2...64 hex characters...9e0a",
"secretWarning": "Store this secret securely. It will not be shown again."
}
Role Migration
Imported Role Properties
| Property | Mapping |
|---|---|
name | Role name |
description | Role description |
Permissions
Auth0 role permissions are not migrated. These need to be recreated using Idenplane's authorization policies:
// Auth0 permission format
{
"permission_name": "read:users",
"resource_server_identifier": "my-api"
}
// Idenplane equivalent: Create ABAC policy
{
"effect": "ALLOW",
"actions": ["users:read"],
"resources": ["urn:idenplane:resource:users:*"]
}
See Authorization Guide for policy creation.
Identity Provider Migration
Connection Strategies
Auth0 connections are migrated as identity providers based on strategy:
| Strategy | Idenplane Provider Type |
|---|---|
oidc | oidc, with the connection's authorization_endpoint, token_endpoint, userinfo_endpoint, jwks_uri and issuer |
oauth2 | oauth2, with the connection's authorizationURL and tokenURL |
google-oauth2, windowslive | oidc, with Google's or Microsoft's endpoints filled in |
github | oauth2, with GitHub's endpoints filled in |
samlp | saml, from the IdP metadata in the connection's metadataXml (see below) |
adfs, waad and every other strategy | Not imported: listed in warnings |
auth0 | Skipped (database connections) |
A samlp connection is imported as a SAML identity provider when the export carries the IdP's metadata (options.metadataXml): the IdP entity ID, SSO URL and signing certificates come from it, and signSAMLRequest and protocolBinding from the connection. Auth0 keeps no IdP entity ID outside the metadata, so a connection without it is skipped with a warning naming what is missing; add that IdP in the admin console from its metadata. Either way, register Idenplane's SP metadata at the IdP: its entity ID and ACS URL are new. adfs (WS-Federation) and waad connections are not imported; ADFS and Entra ID also speak SAML 2.0 and OpenID Connect.
A connection is imported only with everything the broker needs: a client ID and http(s) authorization and token URLs. One without them is skipped with a warning naming the missing fields. Imported providers keep trustEmail off; a connection exported without its client secret is imported disabled, with a warning, until you set the secret.
Database Connections
Auth0 database connections (Username-Password-Authentication) are not migrated:
{
"warnings": [
{ "entity": "connection", "message": "Database connection 'my-db-connection' skipped — Auth0 DB connections don't map to identity providers" }
]
}
Imported Provider Properties
| Property | Mapping |
|---|---|
name | Provider alias and display name |
strategy | Provider type (see above) |
options.client_id | Provider client ID |
options.client_secret | Provider client secret |
options.authorization_endpoint | Authorization URL |
options.token_endpoint | Token URL |
Organizations
Auth0 Organizations are not automatically migrated:
{
"warnings": [
{ "entity": "organizations", "message": "3 Auth0 organizations found. Use Idenplane's Organization module to recreate them." }
]
}
Recreate organizations manually in Idenplane. See Multi-Tenancy Documentation for organization setup.
Handling Large Exports
Batch Processing
The import endpoint accepts a JSON body of up to 10 MB (every other endpoint keeps 100 KB); a larger one is refused with 413 Payload Too Large. For exports above that, or with more than 5,000 users:
- Split the export into several files, each with the clients, roles and connections and a slice of
users - Import each batch separately
- Use the same
targetRealmfor every batch. Entities that already exist are skipped, so repeating clients, roles and connections is harmless
Creating Batched Export Files
# Count users
USER_COUNT=$(jq '.users | length' auth0-export.json)
# Batches of 5,000 users, each a complete export with a slice of users
jq '.users |= .[0:5000]' auth0-export.json > batch1-export.json
jq '.users |= .[5000:10000]' auth0-export.json > batch2-export.json
Sequential Import
# Import batch 1
curl -X POST "http://localhost:3000/admin/migration/auth0" \
-H "x-admin-api-key: ${ADMIN_API_KEY}" \
-H "Content-Type: application/json" \
-d "{\"data\": $(cat batch1-export.json), \"targetRealm\": \"my-realm\"}"
# Import batch 2
curl -X POST "http://localhost:3000/admin/migration/auth0" \
-H "x-admin-api-key: ${ADMIN_API_KEY}" \
-H "Content-Type: application/json" \
-d "{\"data\": $(cat batch2-export.json), \"targetRealm\": \"my-realm\"}"
Post-Migration Steps
1. Verify User Count
curl -X GET "http://localhost:3000/admin/realms/my-realm/users?limit=1" \
-H "x-admin-api-key: ${ADMIN_API_KEY}"
2. Verify Roles
User role assignments are not imported. Check the roles, then assign them to users or groups again:
curl -X GET "http://localhost:3000/admin/realms/my-realm/roles" \
-H "x-admin-api-key: ${ADMIN_API_KEY}"
3. Test Authentication
Sign in through the browser login (/realms/{realm}/protocol/openid-connect/auth) with a client you created, using a few migrated users. The password grant checks imported hashes the same way as the login page, and either one moves the hash to Argon2id on the first successful sign-in.
If a client allows the password grant, you can script the check:
async function testMigration(realm: string, testUsers: { username: string; password: string }[]) {
const results: { user: string; success: boolean; error?: string }[] = [];
for (const { username, password } of testUsers) {
try {
const response = await fetch(
`http://localhost:3000/realms/${realm}/protocol/openid-connect/token`,
{
method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
body: new URLSearchParams({
username,
password,
grant_type: 'password',
client_id: 'my-app', // a client with "password" in its grantTypes
}),
}
);
results.push({ user: username, success: response.ok });
} catch (error) {
results.push({ user: username, success: false, error: String(error) });
}
}
return results;
}
4. Update Application Configurations
Update applications to use Idenplane endpoints:
| Auth0 Endpoint | Idenplane Endpoint |
|---|---|
.../.auth0.com/authorize | .../realms/{realm}/protocol/openid-connect/auth |
.../.auth0.com/oauth/token | .../realms/{realm}/protocol/openid-connect/token |
.../.auth0.com/userinfo | .../realms/{realm}/protocol/openid-connect/userinfo |
.../.auth0.com/logout | .../realms/{realm}/protocol/openid-connect/logout |
5. Social Accounts
Social identity links are not imported, and there is no self-service "link account" page. A user is linked to a provider when they sign in through it: Idenplane matches an existing account by e-mail only when the provider has trustEmail on. The importer turns it off, so a migrated user's first social sign-in would create a second account. Turn trustEmail on for providers whose verified e-mail you trust before users sign in through them.
6. Recreate Organizations
Auth0 Organizations need to be manually recreated:
- Create organizations in Idenplane
- Assign users to organizations
- Configure organization-specific settings
7. Notify Users
Send communications to users about the migration:
- Migration completion date
- Password reset requirements (if applicable)
- Social account re-linking instructions
- New login URL
- Support contacts
Troubleshooting
Import Fails with "Realm does not exist"
Cause: Target realm not created before import. The response is 200 with this error in errors, and nothing is imported.
Solution: Create the realm first:
curl -X POST "http://localhost:3000/admin/realms" \
-H "x-admin-api-key: ${ADMIN_API_KEY}" \
-H "Content-Type: application/json" \
-d '{"name": "my-realm", "displayName": "My Realm"}'
Users Not Migrating
Cause: User conflicts with existing data.
Solution: A user is skipped when a user with the same username already exists in the realm. Check errors in the report for failures.
Passwords Not Preserved
Cause: No bcrypt hash in the Auth0 export.
Solution: Request Auth0's password hash export and merge it into password_hash, or have the users reset their passwords.
Identity Providers Not Migrating
Cause: Database connections are skipped automatically.
Solution: Database connections don't map to identity providers. OIDC, OAuth 2.0, Google, Microsoft account and GitHub connections are imported, and samlp connections whose export carries the IdP metadata; every other strategy (adfs, waad, …) is skipped. warnings names each skipped connection and why. Check the strategy field in your export.
Wildcard Origins Stripped
Cause: Wildcard web origins (*) are not allowed in Idenplane.
Solution: After migration, configure explicit allowed origins for affected clients.
API Reference
POST /admin/migration/auth0
Import data from Auth0 Management API export.
Request:
{
"data": {
"users": [/* Auth0 users */],
"clients": [/* Auth0 clients */],
"roles": [/* Auth0 roles */],
"connections": [/* Auth0 connections */]
},
"dryRun": false,
"targetRealm": "my-realm"
}
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
data | object | Yes | Auth0 Management API export JSON |
dryRun | boolean | No | Test migration without changes (default: false) |
targetRealm | string | Yes | Target realm name (required) |
Response: Migration report with counts of created/skipped/failed entities.
Error Responses:
| Status | Description |
|---|---|
| 200 | Also returned when the target realm doesn't exist; the error is in errors |
| 400 | Bad request — invalid payload or missing targetRealm |
| 401 | Unauthorized — missing or invalid admin credentials |
| 403 | The admin has no global (super-admin) scope |
| 413 | Request body over 10 MB |
The same endpoint family also imports Keycloak and Authentik.
Next Steps
Authentication Guide Learn about OAuth 2.0 and OIDC authentication flows
Authorization Guide Understand RBAC and access control policies
API Reference Complete REST API documentation with examples
React SDK Integrate Idenplane into your React application