# Password change is required after importing bulk user

**URL:** <https://community.auth0.com/t/password-change-is-required-after-importing-bulk-user/78718>\
**Category:** Get Help\
**Tags:** login\
**Created:** [February 22, 2022, 3:19pm UTC](https://community.auth0.com/t/password-change-is-required-after-importing-bulk-user/78718 "2022-02-22T15:19:50Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![hyun.park](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/hyun.park/32/33438_2.png) [@hyun.park](https://community.auth0.com/u/hyun.park)\
**Post date:** [February 22, 2022, 3:19pm UTC](https://community.auth0.com/t/password-change-is-required-after-importing-bulk-user/78718/1 "2022-02-22T15:19:51Z")

</div>

Hello,

I have a question.

I am not able to login after importing bulk users.

I checked log message and got a message about password change is required.

this is one of user data that I imported to auth0 database.

{  
“email”: “[test@gmail.com](mailto:test@gmail.com)”,  
“name”: “name”,  
“user\_metadata”: {  
“default\_lang”: “en”,  
“phone”: “”,  
“user\_name”: “user\_name”,  
“user\_type”: “”  
},  
“custom\_password\_hash”: {  
“algorithm”: “md5”,  
“hash”: {  
“value”: “xxxxxxxxxxxxxxxx”,  
“encoding”: “base64”  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [February 22, 2022, 7:43pm UTC](https://community.auth0.com/t/password-change-is-required-after-importing-bulk-user/78718/3 "2022-02-22T19:43:01Z")

</div>

Hi @hyun.park ,

Thank you for reaching us.

I understand that you want to know why password change is required after importing bulk users.

Do you mind send me a test user’s password and password hash in the DM?

Thanks!

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [February 26, 2022, 12:19am UTC](https://community.auth0.com/t/password-change-is-required-after-importing-bulk-user/78718/5 "2022-02-26T00:19:57Z")

</div>

Hi @hyun.park ,

I could not decode your hash value to match the password. Could you provide a screenshot of the error?

In addition, does this happen with all imported users? Can they log in after changing password?

BTW, I tried with bcrypt and it’s working fine. Below is my scripts. This could be an alternative solution if you want to bulk import users with password.

```auto
  {
        "name": "test@test.com",
        "email": "test@test.com",
        "user_metadata": {
            "hobby": "xxx"
        },
        "app_metadata": {
            "organization": "xxx"
        },
        "custom_password_hash": {
            "algorithm": "bcrypt",
            "hash": {
                "value": "xxxx"
            }
        }
    }

```

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [February 28, 2022, 7:04pm UTC](https://community.auth0.com/t/password-change-is-required-after-importing-bulk-user/78718/7 "2022-02-28T19:04:34Z")

</div>

Hi @hyun.park ,

If you can DM me the details about how you generate the hash value using your password, I will look into this further.

Thanks.

---

<div class="post-metadata">

**Author:** ![ray1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ray1/32/33369_2.png) [@ray1](https://community.auth0.com/u/ray1)\
**Post date:** [June 7, 2022, 9:46pm UTC](https://community.auth0.com/t/password-change-is-required-after-importing-bulk-user/78718/8 "2022-06-07T21:46:38Z")

</div>

I’m facing the same issue where password change is required. It’s happening for all my users. This is an example user with the original password “password”:  
{  
“email”: “[bobtesting@dw.com](mailto:bobtesting@dw.com)”,  
“email\_verified”: true,  
“custom\_password\_hash”: {  
“algorithm”: “pbkdf2”,  
“hash”: {  
“value”: “$pbkdf2-sha256$i=150000,l=8$OUNDYTdwc2M$OGMxMTczY2QyYWYxOGIyOWM4ZTkxODJkNDcxZTE4MTNhZGM5NTljM2M3NDkwMjQzNzMwMmU1MDdkMjVmMzZiMA”,  
“encoding”: “utf8”  
}  
}  
}

Do you know why this is happening?

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [June 10, 2022, 8:50pm UTC](https://community.auth0.com/t/password-change-is-required-after-importing-bulk-user/78718/9 "2022-06-10T20:50:34Z")

</div>

Hi @ray1 ,

Welcome to the Auth0 Community!

I tested your scripts by adding the password encoding field, and it works! Could you please give it a try?

```auto
[
	{
	"email": "bobtesting@dw.com",
	"email_verified": true,
	"custom_password_hash": {
		"algorithm": "pbkdf2",
		"hash": {
			"value": "$pbkdf2-sha256$i=150000,l=8$OUNDYTdwc2M$OGMxMTczY2QyYWYxOGIyOWM4ZTkxODJkNDcxZTE4MTNhZGM5NTljM2M3NDkwMjQzNzMwMmU1MDdkMjVmMzZiMA",
			"encoding": "utf8"
		},
	 	"password": {
	        "encoding": "binary"
	    }
	}
}
]

```

Hope this helps!

---

<div class="post-metadata">

**Author:** ![ray1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ray1/32/33369_2.png) [@ray1](https://community.auth0.com/u/ray1)\
**Post date:** [June 10, 2022, 11:03pm UTC](https://community.auth0.com/t/password-change-is-required-after-importing-bulk-user/78718/10 "2022-06-10T23:03:04Z")

</div>

Hi @lihua.zhang, i tried importing what you pasted above and the migration is successful, but im still seeing the banner that says “password change is required” when i try and log in with “password”.

I also suspect that ive been using the wrong keylen, i think it should be 32, but im still facing the same issue even when i update that value.

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [June 10, 2022, 11:48pm UTC](https://community.auth0.com/t/password-change-is-required-after-importing-bulk-user/78718/11 "2022-06-10T23:48:40Z")

</div>

Hi @ray1 ,

Could you please repeat this issue in the and DM me the [HAR file](https://auth0.com/docs/troubleshoot/generate-and-analyze-har-files) and the screenshot? And is this repeatable in the Chrome incognito mode? Thanks!

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [June 15, 2022, 5:37pm UTC](https://community.auth0.com/t/password-change-is-required-after-importing-bulk-user/78718/12 "2022-06-15T17:37:35Z")

</div>

Hi @ray1 ,

I tried with keylength 64 and it works. Here is my scripts.

```auto
[
    {
    "email": "bobtestingkk2@dw.com",
    "email_verified": true,
    "custom_password_hash": {
        "algorithm": "pbkdf2",
        "hash": {
            "value": "$pbkdf2-sha256$i=150000,l=64$OUNDYTdwc2M$OGMxMTczY2QyYWYxOGIyOWM4ZTkxODJkNDcxZTE4MTNhZGM5NTljM2M3NDkwMjQzNzMwMmU1MDdkMjVmMzZiMA",
            "encoding": "utf8"
        },
        "password": {
            "encoding": "binary"
        }
    }
}
]

```

 ![image](https://global.discourse-cdn.com/auth0/original/3X/a/f/af011a0d35a316d22d45cf7465f38b6a52e71d07.jpeg)

Hope this change will work for you! Please DM me if any further queries. Thanks!

---

<div class="post-metadata">

**Author:** ![ray1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ray1/32/33369_2.png) [@ray1](https://community.auth0.com/u/ray1)\
**Post date:** [June 15, 2022, 5:47pm UTC](https://community.auth0.com/t/password-change-is-required-after-importing-bulk-user/78718/13 "2022-06-15T17:47:56Z")

</div>

Hi, I actually figured out my own issue which was that i needed to convert the stored hex hash in my personal database to binary data with `binascii.unhexlify`, before then converting it to b64. This seemed to fix the problem for me. It works now, with a keylength of 32.

Thank you for your help regardless.

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [June 15, 2022, 5:49pm UTC](https://community.auth0.com/t/password-change-is-required-after-importing-bulk-user/78718/14 "2022-06-15T17:49:49Z")

</div>

Thank you @ray1 for sharing the updates with us! Glad to know that you resolve this issue! 👍 👏

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [June 15, 2022, 5:50pm UTC](https://community.auth0.com/t/password-change-is-required-after-importing-bulk-user/78718/15 "2022-06-15T17:50:46Z")

</div>


