Retrieve deleted user using its user_id

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 :slight_smile:

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

This information could be exported prior to the deletion of the user, by doing a call to the get user endpoint from the management API. Alternatively, you could export the logs to a third party, 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:

1 Like

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

1 Like

Let us know if you have any further questions!

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