Figure out used identity on linked users

We are linking users to each other from the same databases. So user A is linked to user B, with A being the marked primary users.

Is there a way we can know whether user A’s or user B’s credentials were being used to login? We would like to append this username in a claim in the id_token yet all event data in the post-login action references only user A regardless of using user B’s credentials.

Hi @mbosman

Welcome to the Auth0 Community!

Please allow me some time to research the options that we have in this case and I will be back as soon as possible with new information.

Just wanting to verify, both of the linked identities come from the same Connection, correct? In case the Connection is different for the users, it is possible to verify via event.connection as mentioned in the following topic : Linked Identities - which was used to login?

Will be waiting for your confirmation, thank you for your patience in the mean time!
Gerald

Hi there!

Based on what I could find for your specific use-case, adding another layer of separation to the users is most likely needed in order to be able to separate the identities, such as the Connection mentioned in my previous reply. After some tests, this method should prove reliable, but the downside is that the user identities would need to originate from different Connections in order to have this identifier different.

Hope this helped!
Gerald