Migrate users from Asp.net Identity to Auth0

Hi, I’m trying to move an user from Asp.net Identity to Auth0 using the Import extension Auth0 provided.

Asp.net Identity saves the hash and security stamp in AspnetUsers table.

Here is a sample:

Hash: AQAAAAEAACcQAAAAEHdxpBZPL+ZGQ++wgRm3GGiiWjlB+dLr0le6qgnMsNpGZ3qLzI5AoSpcpgrwTtUaUg==


Original password for testing: Password@1

I tried the following json to import an user with the above password.

		"user_id": "e5324e2e-4f67-474d-a65a-be689aecc011",
		"email": "MigrationTest@test.com",
		"custom_password_hash": {
			"algorithm": "sha1",
			"hash": {
				"value": "AQAAAAEAACcQAAAAEHdxpBZPL+ZGQ++wgRm3GGiiWjlB+dLr0le6qgnMsNpGZ3qLzI5AoSpcpgrwTtUaUg==",
				"encoding": "utf8"
			"salt": {
				"value": "UkdTTFJES0o1T1RWUzRJNlNXN0JUNVRPVzVCQ0hYT08="
		"given_name": "Test1",
		"family_name": "Test2",
		"nickname": "Tes3",
		"blocked": false,
		"email_verified": true

I was able to import the user successfully but when I try to login with the credentials, Auth0 not able to validate the password. “Verification failed for the provided custom_password_hash
I tried to replace with md5, sha1, sha256 with different positions prefix and suffix. No success.

Any help is greatly appreciated. This is a critical step in our migration now.

Hi @Uday81,

It looks like it might be the encoding.

The doc says

When the algorithm is set to md4 , md5 , sha1 , sha256 , or sha512 :

  • hash.encoding must be either hex or base64 .

Sure Thanks. Let me give a try.

1 Like

Let us know how it goes!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.