Delete a social connection user

Problem Statement

I noticed that even when I delete an Apple Social User in Auth0, it doesn’t delete all the way because the next time they log in, it treats them like an already existing account and shows the entire history in the logs from before I deleted it. I assume that means there’s a shadow version of it somewhere.

How can I completely delete/wipe out a social user (including all shadow accounts) so that I can start fresh with testing each time?

Symptoms

User History for Social Connection Users persists after deleting the user from Auth0.

Steps to Reproduce

  1. Create a Social User
  2. Login with that user
  3. Delete the user via Management API
  4. Take a look at tenant logs or User History.

Solution

This is the expected behavior when deleting a Social Connection User.

You can delete Social Users, but the tenant logs are immutable, meaning that the Social Users’ User History will persist even after deletion.

Regardless if the user is removed and added again, the Social user will be assigned the same User ID. Specifically, the User_ID after the identifier will remain static for Social Connections users to prevent them from signing up multiple times.

Therefore, if a deleted social user signs up again, they will retain the same User_ID that will match their User History Logs. This is different from Database or Enterprise Connection users since they are always given a random user ID on signup.