Delete a social connection user
Last Updated:
Overview
I am trying to test out sign in with apple of staging. I only have one apple id, so I need to be able to reset it in order to test different workflows. I noticed that even when I delete the user in auth0 it doesn't delete all the way because the next time I try to login with it, it treats it like an already existing account and shows the entire history in the logs from before I deleted it. I assume that means theres a shadow version of it somewhere. If I saw that with a database account I would call the api endpoint `DELETE /api/v2/connections/{id}/users` to complete wipe it out, but apparently that endpoint only works for database accounts.
How can I completely delete/wipe out a social user (including all shadow accounts) so that I can start fresh with testing each time?
Thanks
Solution
Since the Social user is deleted, and if they ever sign up again they will have the exact same User_ID and this will match to the User History logs as it only does a flat compare to the user_id in the log. This is why you won't see this for DB users or Enterprise connection users as they are given a random user ID on signup, but Social Providers use the account itself to determine this.
MFA enrollments remain too. However, we do have a method to clear MFA enrollments if you are interested. This is documented and can be done via the API: https://auth0.com/docs/secure/multi-factor-authentication/reset-user-mfa#use-the-management-api, to fetch the enrollments for a user and delete them when they are removed.
We appreciate your feedback regarding this feature and I encourage you to provide further details about your use case so you can try and influence our roadmap. To ensure that your feedback is captured in full, please visit our Feedback page found at https://auth0.com/feedback to submit your request.