# Retrieve deleted user using its user\_id

**URL:** <https://community.auth0.com/t/retrieve-deleted-user-using-its-user-id/59070>\
**Category:** Get Help\
**Tags:** auth0\
**Created:** [March 8, 2021, 4:25pm UTC](https://community.auth0.com/t/retrieve-deleted-user-using-its-user-id/59070 "2021-03-08T16:25:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![visheyra](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/visheyra/32/23180_2.png) [@visheyra](https://community.auth0.com/u/visheyra)\
**Post date:** [March 8, 2021, 4:25pm UTC](https://community.auth0.com/t/retrieve-deleted-user-using-its-user-id/59070/1 "2021-03-08T16:25:15Z")

</div>

Hello there,

I’m working on a logging functionality at my company and would like to implement logs for every mutation on my backend per user (this include legal purpose, such as modification history, …). I am not able to retrieve the mail address from the customer through the JWT (which is normal) but I am able to retrieve its user id. In case of issue from my customer, my go to case is “mr xxx was fired last month and we think he made fraudulent requests to the admin of your app using his account”. How would I reconcile its mail adress sent from my customer to its auth0 user id assuming its account has been suppressed ? would auth0 support assists me in that case ? Should I find another way to reconcile this information ?

Thank in advance for any help 🙂

---

<div class="post-metadata">

**Author:** ![ricardo.batista](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ricardo.batista/32/7711_2.png) [@ricardo.batista](https://community.auth0.com/u/ricardo.batista)\
**Post date:** [March 9, 2021, 7:35am UTC](https://community.auth0.com/t/retrieve-deleted-user-using-its-user-id/59070/2 "2021-03-09T07:35:40Z")

</div>

Hi @visheyra

Reconciling an email address with a user\_id after the user has been deleted from the Auth0 database falls under the unsupported requests in our policy: [Auth0 Operational Policies](https://auth0.com/docs/policies#unsupported-requests)

This information could be exported prior to the deletion of the user, by doing a call to the [get user endpoint](https://auth0.com/docs/api/management/v2#!/Users/get_users_by_id) from the management API. Alternatively, you could [export the logs to a third party](https://auth0.com/docs/logs/streams), which would provide you with a “Delete user” API operation log containing both the user\_id and the email. You can read more about how to export logs here:

> **[Log Streams](https://auth0.com/docs/customize/log-streams)**
>
> Describes how to export your log events in near real-time using log streaming.

> **[Export Log Events with Extensions](https://auth0.com/docs/customize/extensions/export-log-events-with-extensions)**
>
> Lists the event log extensions that you can use to integrate with data analysis services.

> **[Retrieve Log Events Using the Management API](https://auth0.com/docs/deploy-monitor/logs/retrieve-log-events-using-mgmt-api)**
>
> Learn how to retrieve log events using the Auth0 Management API get\_logs endpoint by checkpoint or by search criteria.

---

<div class="post-metadata">

**Author:** ![visheyra](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/visheyra/32/23180_2.png) [@visheyra](https://community.auth0.com/u/visheyra)\
**Post date:** [March 9, 2021, 9:13am UTC](https://community.auth0.com/t/retrieve-deleted-user-using-its-user-id/59070/3 "2021-03-09T09:13:59Z")

</div>

Thank you very much for the detailed answer. I will look to implement such feature then.

---

<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:** [March 9, 2021, 9:52am UTC](https://community.auth0.com/t/retrieve-deleted-user-using-its-user-id/59070/4 "2021-03-09T09:52:44Z")

</div>

Let us know if you have any further questions!

---

<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:** [March 24, 2021, 9:53am UTC](https://community.auth0.com/t/retrieve-deleted-user-using-its-user-id/59070/5 "2021-03-24T09:53:00Z")

</div>

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