# Unsupported password hash algorithm during bulk user import job

**URL:** <https://community.auth0.com/t/unsupported-password-hash-algorithm-during-bulk-user-import-job/73891>\
**Category:** Get Help\
**Created:** [November 29, 2021, 1:42am UTC](https://community.auth0.com/t/unsupported-password-hash-algorithm-during-bulk-user-import-job/73891 "2021-11-29T01:42:58Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![djrazor308](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/djrazor308/32/33201_2.png) [@djrazor308](https://community.auth0.com/u/djrazor308)\
**Post date:** [November 29, 2021, 1:42am UTC](https://community.auth0.com/t/unsupported-password-hash-algorithm-during-bulk-user-import-job/73891/1 "2021-11-29T01:42:58Z")

</div>

Hi,

Is it possible to force the user to change his password after first login? I’m using a bulk user import job and each user has a custom hashed password section filled. However, I need the user to change the pass after login. I import ~500 users, so I don’t want to create a 500 ‘password change’ requests, especially because there is no way to do that for several users in a row. Please, correct me if I’m wrong.  
After searching I found this article: [Bulk User Imports](https://auth0.com/docs/users/import-and-export-users/bulk-user-imports) and this particular pre-request::

- If you are importing passwords, make sure the passwords are hashed using one of the supported algorithms. Users with passwords hashed by unsupported algorithms will need to reset their password when they log in for the first time after the bulk import.\*  
I tried to use an unsupported hash algorithm, but in that case users weren’t imported at all. Is this way still relevant? If so, how should I modify my user object so Auth0 understands unsupported algorithm, imports a user and forces him to change the pass?

---

<div class="post-metadata">

**Author:** ![djrazor308](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/djrazor308/32/33201_2.png) [@djrazor308](https://community.auth0.com/u/djrazor308)\
**Post date:** [November 29, 2021, 1:45am UTC](https://community.auth0.com/t/unsupported-password-hash-algorithm-during-bulk-user-import-job/73891/2 "2021-11-29T01:45:09Z")

</div>

Sorry, formatting issue. It should be:  
…and this particular pre-request:: _If you are importing passwords, make sure the passwords are hashed using one of the supported algorithms. Users with passwords hashed by unsupported algorithms will need to reset their password when they log in for the first time after the bulk import._

I tried to use an unsupported hash algorithm, but in that case users weren’t imported at all. Is this way still relevant? If so, how should I modify my user object so Auth0 understands unsupported algorithm, imports a user and forces him to change the pass?

---

<div class="post-metadata">

**Author:** ![derwald](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/derwald/32/42568_2.png) [@derwald](https://community.auth0.com/u/derwald)\
**Post date:** [January 18, 2023, 10:30am UTC](https://community.auth0.com/t/unsupported-password-hash-algorithm-during-bulk-user-import-job/73891/3 "2023-01-18T10:30:38Z")

</div>

I have exactly the same question. @djrazor308 Did you find a solution?

---

<div class="post-metadata">

**Author:** ![derwald](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/derwald/32/42568_2.png) [@derwald](https://community.auth0.com/u/derwald)\
**Post date:** [January 18, 2023, 10:45am UTC](https://community.auth0.com/t/unsupported-password-hash-algorithm-during-bulk-user-import-job/73891/4 "2023-01-18T10:45:32Z")

</div>

Or @dan.woda , do you have any idea on this?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [January 18, 2023, 2:23pm UTC](https://community.auth0.com/t/unsupported-password-hash-algorithm-during-bulk-user-import-job/73891/5 "2023-01-18T14:23:03Z")

</div>

> [@djrazor308](#):
>
> Is it possible to force the user to change his password after first login?

Yes, this is possible. The Classic Universal Login experience will throw an error if you pass a bad hash. There is an example of it in this thread:

> [@Error after importing user with custom password hash](https://community.auth0.com/t/error-after-importing-user-with-custom-password-hash/84260):
>
> Once i imported users with a existing password, I’m always getting the following error message. Any reason for the issue?

---

<div class="post-metadata">

**Author:** ![derwald](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/derwald/32/42568_2.png) [@derwald](https://community.auth0.com/u/derwald)\
**Post date:** [January 18, 2023, 2:34pm UTC](https://community.auth0.com/t/unsupported-password-hash-algorithm-during-bulk-user-import-job/73891/6 "2023-01-18T14:34:48Z")

</div>

Thank you for the very quick response, will test it!

---

<div class="post-metadata">

**Author:** ![derwald](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/derwald/32/42568_2.png) [@derwald](https://community.auth0.com/u/derwald)\
**Post date:** [January 18, 2023, 3:24pm UTC](https://community.auth0.com/t/unsupported-password-hash-algorithm-during-bulk-user-import-job/73891/7 "2023-01-18T15:24:41Z")

</div>

@dan.woda I tried to willingly create an invalid hash for the examples listed here [Bulk User Import Database Schema and Examples](https://auth0.com/docs/manage-users/user-migration/bulk-user-import-database-schema-and-examples). For some algorithms, like bcrypt, an incorrect hash will not even import the new user; and for some others, like md4, I couldn’t create an incorrect hash.

Do you happen to know which incorrect hash (if possible please with an example, including which algorithm and which hash value), will:

1. Import the user
2. When that users tries to login, will see a screenshot like in [Error after importing user with custom password hash](https://community.auth0.com/t/error-after-importing-user-with-custom-password-hash/84260)

Thank you so much for your help!

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [January 18, 2023, 3:49pm UTC](https://community.auth0.com/t/unsupported-password-hash-algorithm-during-bulk-user-import-job/73891/9 "2023-01-18T15:49:56Z")

</div>

Here’s and example of what I used:

```json
[
  {
    "user_id": "2000",
    "email": "examplecouser20@example.com",
    "given_name": "ExampleCo User",
    "name": "ExampleCoUser20",
    "custom_password_hash": {
      "algorithm": "bcrypt",
      "hash": {
        "value": "$2a$10$aHF7mbpWTzzz7PJVtwtjNelaKbszikcYBCB2jibvbFcGFmOsu/s4K"
      }
    }
  }
]

```

---

<div class="post-metadata">

**Author:** ![derwald](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/derwald/32/42568_2.png) [@derwald](https://community.auth0.com/u/derwald)\
**Post date:** [January 18, 2023, 4:16pm UTC](https://community.auth0.com/t/unsupported-password-hash-algorithm-during-bulk-user-import-job/73891/10 "2023-01-18T16:16:35Z")

</div>

Thanks…unfortunately for me that results in a message ‘Wrong password’ when I try to login for that user and does not result in this ‘Password needs to be updated because of first time login’ message. Are you sure it is an incorrect hash?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [January 18, 2023, 5:45pm UTC](https://community.auth0.com/t/unsupported-password-hash-algorithm-during-bulk-user-import-job/73891/11 "2023-01-18T17:45:40Z")

</div>

Are you using Classic UL?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [February 1, 2023, 5:45pm UTC](https://community.auth0.com/t/unsupported-password-hash-algorithm-during-bulk-user-import-job/73891/12 "2023-02-01T17:45:51Z")

</div>

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