# Bulk User Import Customer Hash - Does Auth0 Change to bCrypt

**URL:** <https://community.auth0.com/t/bulk-user-import-customer-hash-does-auth0-change-to-bcrypt/62383>\
**Category:** Get Help\
**Created:** [May 7, 2021, 5:02am UTC](https://community.auth0.com/t/bulk-user-import-customer-hash-does-auth0-change-to-bcrypt/62383 "2021-05-07T05:02:02Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![info38](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/info38/32/12811_2.png) [@info38](https://community.auth0.com/u/info38)\
**Post date:** [May 7, 2021, 5:02am UTC](https://community.auth0.com/t/bulk-user-import-customer-hash-does-auth0-change-to-bcrypt/62383/1 "2021-05-07T05:02:02Z")

</div>

Hi All,

I’m searched docs, blogs and here in community for an answer to this, but have had no luck. I’d like to know which hash Auth0 uses after bulk import of users with the “custom\_password\_hash” field used.

Does Auth0 authenticate the user using our custom hash the first time, and then create a new hash using bCrypt and use that for all future logins?

Thanks in advance.

Dave

---

<div class="post-metadata">

**Author:** ![markd](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/markd/32/38919_2.png) [@markd](https://community.auth0.com/u/markd)\
**Post date:** [May 8, 2021, 3:47am UTC](https://community.auth0.com/t/bulk-user-import-customer-hash-does-auth0-change-to-bcrypt/62383/2 "2021-05-08T03:47:56Z")

</div>

Hello @info38,

Welcome to the Community! That is correct. On first login Auth0 will rehash the password using bcrypt.

---

<div class="post-metadata">

**Author:** ![info38](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/info38/32/12811_2.png) [@info38](https://community.auth0.com/u/info38)\
**Post date:** [May 18, 2021, 8:00am UTC](https://community.auth0.com/t/bulk-user-import-customer-hash-does-auth0-change-to-bcrypt/62383/3 "2021-05-18T08:00:49Z")

</div>

Thanks for replying @markd

I’m curious, when we import the users, on first login they are prompted to change password. If that is the correct UX, what is the purpose of the custom password hash?

I’m not sure if we’ve done something wrong, but I can’t see where the login authenticates against the old hash before converting. For us it’s simply forcing a password change.

---

<div class="post-metadata">

**Author:** ![markd](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/markd/32/38919_2.png) [@markd](https://community.auth0.com/u/markd)\
**Post date:** [May 18, 2021, 1:34pm UTC](https://community.auth0.com/t/bulk-user-import-customer-hash-does-auth0-change-to-bcrypt/62383/4 "2021-05-18T13:34:21Z")

</div>

Sounds like something has gone wrong with the import, or there’s something else in your login flow. If the password hashes were imported correctly, you should not get getting prompted to reset your password.

---

<div class="post-metadata">

**Author:** ![info38](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/info38/32/12811_2.png) [@info38](https://community.auth0.com/u/info38)\
**Post date:** [May 19, 2021, 4:13am UTC](https://community.auth0.com/t/bulk-user-import-customer-hash-does-auth0-change-to-bcrypt/62383/5 "2021-05-19T04:13:33Z")

</div>

Hi @markd thanks for taking the time to help.

We tried a demo import from the Auth0 docs and have the same issue. We appear to be using a very vanilla/standard login flow. Is there somewhere in settings specifically I should check with this in mind?

---

<div class="post-metadata">

**Author:** ![markd](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/markd/32/38919_2.png) [@markd](https://community.auth0.com/u/markd)\
**Post date:** [May 19, 2021, 1:41pm UTC](https://community.auth0.com/t/bulk-user-import-customer-hash-does-auth0-change-to-bcrypt/62383/6 "2021-05-19T13:41:19Z")

</div>

I don’t recall having to change any settings. I think when I did this it may have been a beta feature and I needed to get my TAM to enable it for me but I believe password import is in GA now.

If it helps, here’s a faked example of the data file format I used for my user import with passwords. In my case they were SSHA hashed passwords from an old LDAP directory server.

```auto
[
    {
        "email": "shepard@sr2.ca",
        "email_verified": true,
        "user_id": "shepard@sr2.ca",
        "username": "shepard",
        "custom_password_hash": {
            "algorithm": "ldap",
            "hash": {
                "value": "{SSHA}ABC+123==",
                "encoding": "utf8"
            }
        },
        "user_metadata": {
            "language_preference": "en"
        },
        "app_metadata": {
            "roles": [
                "commander"
            ],
            "onboarded": "2183-05-16T17:41:22.028Z"
        }
    },
    {
        "email": "garrus@sr2.ca",
        "email_verified": true,
        "user_id": "garrus@sr2.ca",
        "username": "garrus",
        "custom_password_hash": {
            "algorithm": "ldap",
            "hash": {
                "value": "{SSHA}DEF+456==",
                "encoding": "utf8"
            }
        },
        "user_metadata": {
            "language_preference": "tu"
        },
        "app_metadata": {
            "roles": [
                "callibrator"
            ],
            "onboarded": "2083-05-25T12:23:22.178Z"
        }
    }
]

```

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [May 20, 2021, 11:17am UTC](https://community.auth0.com/t/bulk-user-import-customer-hash-does-auth0-change-to-bcrypt/62383/8 "2021-05-20T11:17:35Z")

</div>

Previous message deleted due to SPAM reasons.

---

<div class="post-metadata">

**Author:** ![info38](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/info38/32/12811_2.png) [@info38](https://community.auth0.com/u/info38)\
**Post date:** [May 25, 2021, 5:14am UTC](https://community.auth0.com/t/bulk-user-import-customer-hash-does-auth0-change-to-bcrypt/62383/9 "2021-05-25T05:14:59Z")

</div>

Ok so good news is, we worked it out. Bad news is, it implies I’m not as clever as I thought. Haha.

We had the wrong encoding set. Sooo trap for new players, if your users are forced to change password after import, check your encoding variable…and probably all variables which clearly I had failed to do.

Sorry for wasting your time guys with something so silly, but I really appreciate the help and hope this thread helps others who might get stuck.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [May 25, 2021, 8:32am UTC](https://community.auth0.com/t/bulk-user-import-customer-hash-does-auth0-change-to-bcrypt/62383/10 "2021-05-25T08:32:30Z")

</div>

No worries! Glad you have figured it out and thanks for sharing with the rest of community!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [May 27, 2021, 10:46am UTC](https://community.auth0.com/t/bulk-user-import-customer-hash-does-auth0-change-to-bcrypt/62383/11 "2021-05-27T10:46:40Z")

</div>


