Good day, would it be possible to find out when exactly an Auth0 ID was deleted? Also, is it possible to restore a previously deleted Auth0 ID? If so, how do I go about it?
Welcome to the Auth0 Community!
I understand that you are asking whether Auth0 records the exact time a user_ID was deleted, and whether deleted users can be restored.
Currently there is no built-in restore function for deleted users, however you can find deletion timestamps through the Auth0 logs, and there are limited workarounds depending on your situation.
Root Cause:
When a user is deleted in Auth0, the deletion is permanent and cannot be reversed through the dashboard or Management API. However, Auth0 maintains an audit log of all administrative actions, including user deletions, which records the exact timestamp of when the deletion occurred.
Solution:
To find the deletion timestamp and the responsible party, you need to search for the specific deletion events in the Auth0 Dashboard.
Step 1: Find the User ID
Log entries for user deletion only contain the user_id, not the email address.
If you only have the user’s email:
-
Navigate to Monitoring > Logs in the Auth0 Dashboard.
-
Search for the user’s email address (e.g.,
user@domain.com) to find past events like a successful login or logout. -
Extract the
user_id(e.g.,auth0|1234567890) from that past event.
Step 2: Query for the Deletion Event
-
In Monitoring > Logs, run a new search using the
user_idand the following event filters:type:sapi AND description:"Delete a User" AND details.request.path:"/api/v2/users/<user_id>"OR
type:sdu(Successfully Deleted User). -
The log will show you the exact timestamp of the deletion
Note: You can only find this information if the deletion occurred within your tenant’s log retention period
Regarding restoration:
Auth0 does not offer a direct restore feature, and once deleted, a user cannot be recovered. Depending on your use-case, you do have the option to recreate the user manually by creating a new user with the same email address and connection through the Dashboard or Management API.
Please reach out to us for any other issues or requests, we will gladly look into it!
Have a great one,
Gerald