Search last 4 characters of firstname in user_metadata using search criteria

Hello,

I am using management api to find the users data having last 4 characters of firstname as mock

Below is my schema in the auth0 db.
{
“username”:“sample”,
“user_metadata”: {
firstname:“sampleusermock”,
lastname:“mock lastname”
}
}

Api used - api/v2/users?search_engine=v2&q=user_metadata.firstname:*mock

But this gives me empty array.
Need suggestion on how this can be fixed.

Thank you

Hi @chetana.lotliker2

Welcome to the Auth0 Community!

Thanks for posting your question; the above example won’t give results as using wildcards with metadata search is prohibited. Did you try to use the same query but with the name parameter? You can use wildcards here, and from the Normalized User Profile Schema, the name is the user’s full name.

Thanks
Dawid

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.