Overview
This article clarifies what happens to linked identities when deleting a connection or primary ID.
Solution
If the primary account is deleted, the secondary accounts will also be, as they no longer exist as discrete users after linking. For social/enterprise accounts, the next time they log in, it will create a new, discrete user.
- However, issues may arise if the deleted user had a database account linked as a secondary.
- Currently, this will remove the database account from the dashboard users’ view/get users by email endpoints, but creating a new user with the same email will not be possible.
- It is possilbe to restore the secondary Database account to a regular account by the user logging in with their Database credentials if they know them or using a password reset flow—this will bring their account back as a full discrete identity.
An alternative approach would be to unlink user accounts before deleting connections. This would be useful if metadata needed to be preserved, as the metadata could be patched into a now unlinked secondary account prior to deleting the connection/primary ID.
- If a secondary identity’s connection is deleted, it will be removed from the primary account’s identities array, and it will no longer be possible to authenticate into the primary ID using that secondary ID’s credentials.