mirror of
				https://github.com/zitadel/zitadel.git
				synced 2025-10-31 01:03:55 +00:00 
			
		
		
		
	docs: Migrate auth0 users (#5705)
* docs: auth0 migration, add zitadel migration tool * docs: auth0 migration, add zitadel migration tool * use binary * fix typo --------- Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
		| @@ -7,6 +7,7 @@ Migrating users from Auth0 to ZITADEL requires the following steps: | ||||
|  | ||||
| - Request and download hashed passwords | ||||
| - Export all user data | ||||
| - Run migration tool to merge Auth0 users and passwords | ||||
| - Import users and password hashes to ZITADEL | ||||
|  | ||||
| ## Export hashed passwords | ||||
| @@ -34,8 +35,37 @@ See this [community post](https://community.auth0.com/t/password-hashes-export-d | ||||
| Create a [bulk user export](https://auth0.com/docs/manage-users/user-migration/bulk-user-exports) from the Auth0 Management API. | ||||
| You will receive a newline-delimited JSON with the requested user data. | ||||
|  | ||||
| This is an example request, we have included the user id, the email and the name of the user. Make sure to export the users in a json format. | ||||
|  | ||||
| ```bash | ||||
| curl --request POST \ | ||||
|   --url $AUTH0_DOMAIN/api/v2/jobs/users-exports \ | ||||
|   --header 'authorization: Bearer $TOKEN' \ | ||||
|   --header 'content-type: application/json' \ | ||||
|   --data '{ | ||||
| 	"connection_id": "$CONNECTION_ID", | ||||
| 	"format": "json",  | ||||
| 	"fields": [ | ||||
| 		{"name": "user_id"}, | ||||
| 		{"name": "email"}, | ||||
| 		{"name": "name"}, | ||||
| 	] | ||||
| }' | ||||
| ``` | ||||
|  | ||||
| ## Run Migration Tool | ||||
|  | ||||
| We have developed a tool that combines your exported user data with their corresponding passwords to generate the import request body for ZITADEL. | ||||
|  | ||||
| 1. Download the latest release of [github.com/zitadel/zitadel-tools](https://github.com/zitadel/zitadel-tools/releases) | ||||
| 2. Execute the binary with the following flags: | ||||
|  ```bash | ||||
|  ./zitadel-tools migrate auth0 --org=<organisation id> --users=./users.json --passwords=./passwords.json --output=./importBody.json | ||||
|  ``` | ||||
|  Use the Organization ID from your ZITADEL instance where you like to add the users. | ||||
| 3. You will now get a new file importBody.json which contains the body for the request to the import of ZITADEL | ||||
|  | ||||
| ## Import users and password hashes to ZITADEL | ||||
|  | ||||
| You will need to merge the received password hashes with the user bulk export. | ||||
|  | ||||
| After you successfully merged the datasets, you can follow the instructions described in the [Migrate Users](../users) guide to import users to ZITADEL. | ||||
| Copy the content from the importBody.json file created in the last step. | ||||
| You can now follow the instructions described in the [Migrate Users](../users) guide to import users to ZITADEL. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Fabi
					Fabi