# Since when the Get User script is required for the Sign Out action to properly work?

**URL:** <https://community.auth0.com/t/since-when-the-get-user-script-is-required-for-the-sign-out-action-to-properly-work/54378>\
**Category:** Get Help\
**Tags:** custom-database\
**Created:** [December 4, 2020, 6:46pm UTC](https://community.auth0.com/t/since-when-the-get-user-script-is-required-for-the-sign-out-action-to-properly-work/54378 "2020-12-04T18:46:02Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![rsanchez1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rsanchez1/32/24882_2.png) [@rsanchez1](https://community.auth0.com/u/rsanchez1)\
**Post date:** [December 4, 2020, 6:46pm UTC](https://community.auth0.com/t/since-when-the-get-user-script-is-required-for-the-sign-out-action-to-properly-work/54378/1 "2020-12-04T18:46:02Z")

</div>

I have several tenants with custom database connections where I have implemented the Create script and I haven’t implemented the Get User script and it was working fine and users were able to sign out to my apps. Now I have just added a new custom db connection and implemented the Create Script but with this new one, when user tries to sign out it fails saying that I need to implement BOTH Create and Get User scripts. Why is that? and Why it was not needed before? Is there a recent change around this?

---

<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:** [December 6, 2020, 4:41am UTC](https://community.auth0.com/t/since-when-the-get-user-script-is-required-for-the-sign-out-action-to-properly-work/54378/2 "2020-12-06T04:41:27Z")

</div>

Hi @rsanchez1,

Can you post the actual error message? I’m not sure if something changed, but possibly logout is calling GetUser. The docs state:

> The Get User script implements the function executed to determine the current state of existence of a user.

Which seems a bit vague to me but may indicate that GetUser is getting called when you call `/logout`.

---

<div class="post-metadata">

**Author:** ![rsanchez1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rsanchez1/32/24882_2.png) [@rsanchez1](https://community.auth0.com/u/rsanchez1)\
**Post date:** [December 8, 2020, 1:21pm UTC](https://community.auth0.com/t/since-when-the-get-user-script-is-required-for-the-sign-out-action-to-properly-work/54378/3 "2020-12-08T13:21:14Z")

</div>

Sure, the detailed error message is as follows:

_Occurred_

_4 days ago at 2020-12-04 05:05:33.401 UTC_

_Type_

_Failed Signup_

_Description_

_Please implement the Get User script for this database connection at [https://manage.auth0.com/#/connections/database](https://manage.auth0.com/#/connections/database)_

_Connection_

_MyCustomDB_

_Application_

_My APP myAppClientId_

_User_

_[myemail@mydomain.com](mailto:myemail@mydomain.com)_

Something important to clarify is that the problem is not when logout, it is when sign out a new user (attempt to create a new user)

---

<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:** [December 8, 2020, 2:11pm UTC](https://community.auth0.com/t/since-when-the-get-user-script-is-required-for-the-sign-out-action-to-properly-work/54378/4 "2020-12-08T14:11:29Z")

</div>

Is import enabled?

 ![Screen Shot 2020-12-08 at 09.11.05](https://global.discourse-cdn.com/auth0/original/3X/5/1/51791713f6a12bb1fd787480bd9ada6ffa2c964a.png)

---

<div class="post-metadata">

**Author:** ![rsanchez1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rsanchez1/32/24882_2.png) [@rsanchez1](https://community.auth0.com/u/rsanchez1)\
**Post date:** [December 8, 2020, 3:07pm UTC](https://community.auth0.com/t/since-when-the-get-user-script-is-required-for-the-sign-out-action-to-properly-work/54378/5 "2020-12-08T15:07:27Z")

</div>

No, it is disabled. What is this flag for?

---

<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:** [December 8, 2020, 3:38pm UTC](https://community.auth0.com/t/since-when-the-get-user-script-is-required-for-the-sign-out-action-to-properly-work/54378/6 "2020-12-08T15:38:22Z")

</div>

Enabling that flag imports users from your own database into an Auth0 hosted database. If that flag is enabled then the GetUser script is mandatory. Otherwise, it should not be required, unless the requirements have changed and the documentation has not been updated.

---

<div class="post-metadata">

**Author:** ![rsanchez1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rsanchez1/32/24882_2.png) [@rsanchez1](https://community.auth0.com/u/rsanchez1)\
**Post date:** [December 11, 2020, 1:13am UTC](https://community.auth0.com/t/since-when-the-get-user-script-is-required-for-the-sign-out-action-to-properly-work/54378/7 "2020-12-11T01:13:50Z")

</div>

I got information from the support ticket and this is the information they gave me:

_I believe this might be due to a recent issue in the Auth0 Dashboard where saving any field in the dashboard for this connection creates all the scripts for the Custom DB, whereas before it behaved in a way where the script wasn’t created until you specifically saved that script. A fix for this is currently in the Engineering teams backlog._

_If you are wanting to remove the ‘Get User’ script for this connection, you can PATCH the CustomDB by using “Update a connection” ([Auth0 Management API v2](https://auth0.com/docs/api/management/v2#!/Connections/patch_connections_by_id) ) with all the fields except for the scripts you do not want. I’d suggest using the “Get a Connection” ([Auth0 Management API v2](https://auth0.com/docs/api/management/v2#!/Connections/get_connections_by_id) ) endpoint first to ensure you’re not changing any other values. I also suggest you test this out on a dev tenant first to ensure you’re performing this action correctly and not removing any required values._

I have been able to resolved the issue by using the PATCH call they suggested.

---

<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:** [December 11, 2020, 9:06am UTC](https://community.auth0.com/t/since-when-the-get-user-script-is-required-for-the-sign-out-action-to-properly-work/54378/8 "2020-12-11T09:06:47Z")

</div>

Perfect! Thanks for sharing it with the rest of community!

---

<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:** [December 26, 2020, 9:06am UTC](https://community.auth0.com/t/since-when-the-get-user-script-is-required-for-the-sign-out-action-to-properly-work/54378/9 "2020-12-26T09:06:51Z")

</div>

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