Auth0 Home Blog Docs

Users search with linked account's email

api

#1

Hey,
I am trying to search users via a linked account’s email, and tried the following query, not getting anything back:
https://[mytenant].auth0.com/api/v2/users?q=identities.profileData.email:mail@blahblah.com&search_engine=v3

However, it worked if I search via primary account’s email, but that’s not what I am looking for, I am hoping there’s a way to search user via non-primary account email.

thanks!


#2

I ran into this also.

Not very pretty, but I suppose one way to handle this is to update the primary user’s user_metadata with some linked_accounts data and then query on the user_metadata.


#3

Hey,

Thanks for the feedback on our Search v3 functionality! I will bring up to the Engineering team in charge. It seems like a very valid use case to me.


#4

A valid use case for sure. Just for info, in our app, we don’t want the ‘secondary’ email to become available again.

Since linking accounts deletes the secondary account, basically that email is available for sign up again and a basic users by email search doesn’t find the linked email.

Is there a reason that the second account must be deleted?