# Get User scripts of custom database is called twice in various scenarios

**URL:** <https://community.auth0.com/t/get-user-scripts-of-custom-database-is-called-twice-in-various-scenarios/36081>\
**Category:** Get Help\
**Tags:** custom-database\
**Created:** [January 10, 2020, 12:06am UTC](https://community.auth0.com/t/get-user-scripts-of-custom-database-is-called-twice-in-various-scenarios/36081 "2020-01-10T00:06:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![JonHarvey](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jonharvey/32/13280_2.png) [@JonHarvey](https://community.auth0.com/u/JonHarvey)\
**Post date:** [January 10, 2020, 12:06am UTC](https://community.auth0.com/t/get-user-scripts-of-custom-database-is-called-twice-in-various-scenarios/36081/1 "2020-01-10T00:06:27Z")

</div>

Hi,

We are finding that the Get User script of our custom database is being called twice in various scenarios, including on POST to /users (to add a user through the Management API), clicking continue to send a Forgot Password email from the New Universal Login, clicking the link in the Forgot Password email, etc.

We are interested to know whether this is intentional, and if so perhaps the reason for the duplicate calls.

Thanks,  
Jon

---

<div class="post-metadata">

**Author:** ![rashid779939](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rashid779939/32/27027_2.png) [@rashid779939](https://community.auth0.com/u/rashid779939)\
**Post date:** [January 16, 2020, 5:58am UTC](https://community.auth0.com/t/get-user-scripts-of-custom-database-is-called-twice-in-various-scenarios/36081/3 "2020-01-16T05:58:45Z")

</div>

First there should be multiple call against single user authentication flow.  
Are you implimenting your own script (lazy migration) to validate user from external database?

---

<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:** [January 28, 2020, 1:37pm UTC](https://community.auth0.com/t/get-user-scripts-of-custom-database-is-called-twice-in-various-scenarios/36081/4 "2020-01-28T13:37:03Z")

</div>

Hey there!

Have you had a chance to see @rashid779939 message?

---

<div class="post-metadata">

**Author:** ![JonHarvey](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jonharvey/32/13280_2.png) [@JonHarvey](https://community.auth0.com/u/JonHarvey)\
**Post date:** [January 29, 2020, 1:16pm UTC](https://community.auth0.com/t/get-user-scripts-of-custom-database-is-called-twice-in-various-scenarios/36081/5 "2020-01-29T13:16:43Z")

</div>

Yes, @konrad.sopala, actually I did, but we ended up being able to work around the issue that this was causing us and I forgot to reply.

Apologies @rashid779939, thanks for taking the time to respond, but we decided to accept that what was happening was happening and find a way of handling it.

Thanks,  
Jon

---

<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:** [January 29, 2020, 1:28pm UTC](https://community.auth0.com/t/get-user-scripts-of-custom-database-is-called-twice-in-various-scenarios/36081/6 "2020-01-29T13:28:22Z")

</div>

Gotchya! Thanks for letting us know!

---

<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:** [January 29, 2020, 1:28pm UTC](https://community.auth0.com/t/get-user-scripts-of-custom-database-is-called-twice-in-various-scenarios/36081/7 "2020-01-29T13:28:25Z")

</div>


