# Deleting a user from Custom Database does not delete user from application's list of users

**URL:** <https://community.auth0.com/t/deleting-a-user-from-custom-database-does-not-delete-user-from-applications-list-of-users/145574>\
**Category:** Get Help\
**Tags:** apis, application\
**Created:** [September 6, 2024, 11:58pm UTC](https://community.auth0.com/t/deleting-a-user-from-custom-database-does-not-delete-user-from-applications-list-of-users/145574 "2024-09-06T23:58:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![acecauis](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/acecauis/32/20470_2.png) [@acecauis](https://community.auth0.com/u/acecauis)\
**Post date:** [September 6, 2024, 11:58pm UTC](https://community.auth0.com/t/deleting-a-user-from-custom-database-does-not-delete-user-from-applications-list-of-users/145574/1 "2024-09-06T23:58:59Z")

</div>

After following this [guide](https://medium.com/@thedreamsaver/using-amazon-dynamodb-as-a-custom-database-connection-in-auth0-1ec43b8d4c8c), I am using DynamoDB as my custom database.

Until roughly 20 minutes ago, I didn’t notice any issues with deleting users directly from DynamoDB during testing.

An issue I noticed is that each user I delete from my DynamoDB database table stays in the list of Users under my application. Not only that, but I also am unable to delete any of these users. Instead, I receive an error saying:

```plaintext
Error! There was a problem deleting <USER_EMAIL>.

```

Additionally, if I go to the Authentication → Database → DynamoDB-Connection → Custom Database, then Save and Try the `Get User` database action script for any of email of a user I deleted from DynamoDB, I get the following error:

```plaintext
The profile is: undefined

```

### There’s more…

After re-creating the user in my DynamoDB table, using an API call from my web application’s UI, and try sign this user up, I get the following error:

 ![Screenshot 2024-09-06 at 6.54.10 PM](https://global.discourse-cdn.com/auth0/original/3X/4/a/4a1d2121aaef02bfe5f09276523f094152b68322.png)

The error above indicates to me that something is wrong with the `User` list in my Auth0 application.

* * *

Not being able to get rid of these accounts is a major blocker for us since these emails/accounts will be returning users.

Also, in case I need to run through tests like this again, I need to be able to remove users from the `User` list even if I have deleted them from my Custom Database _not_ by using the `Delete` database action script.

Please help!!!

---

<div class="post-metadata">

**Author:** ![acecauis](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/acecauis/32/20470_2.png) [@acecauis](https://community.auth0.com/u/acecauis)\
**Post date:** [September 21, 2024, 6:32pm UTC](https://community.auth0.com/t/deleting-a-user-from-custom-database-does-not-delete-user-from-applications-list-of-users/145574/2 "2024-09-21T18:32:37Z")

</div>

It has been more than 2 weeks.  
Can I please get some eyes on this request for help?

This issue is a blocker for us to continue using Auth0 for authentication!

---

<div class="post-metadata">

**Author:** ![vlad.murarasu](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vlad.murarasu/32/72793_2.png) [@vlad.murarasu](https://community.auth0.com/u/vlad.murarasu)\
**Post date:** [April 1, 2025, 5:42pm UTC](https://community.auth0.com/t/deleting-a-user-from-custom-database-does-not-delete-user-from-applications-list-of-users/145574/4 "2025-04-01T17:42:19Z")

</div>

Hi @acecauis,

The Custom database connection gives the responsibility for managing users to Auth0. That is the central point for any user manipulation. Users need to be both added and deleted from it. Your Auth0 applications will try to access the users saved in the Auth0 User Store so when you’re about to make any change to the database, make it through the Management API.

> **[Delete Script Templates](https://auth0.com/docs/authenticate/database-connections/custom-db/templates/delete#:~:text=The%20script%20is,the%20same%20operation)**
>
> Describes custom database action script templates for user deletion.

For your tests use the Management API to delete users instead of deleting them directly from the database

If you have any other question feel free to reach out.

Have a good one,  
Vlad

---

<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:** [April 15, 2025, 5:42pm UTC](https://community.auth0.com/t/deleting-a-user-from-custom-database-does-not-delete-user-from-applications-list-of-users/145574/5 "2025-04-15T17:42:58Z")

</div>

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