Management API - Sorting by app_metadata fields not working

I am using the Management API to do user searching, at https://(mydomain) This has been good so far, but I have a requirement to sort my results by a second-level app_metadata property (e.g. my sort field is like ‘app_metadata.CustomObject.CustomProperty:1’). This isn’t working - the users come back in the default order. I’ve noted that sorting does work as expected when using top-level user properties. If I can’t sort on metadata properties then is there a way to get custom top-level User properties added?

Thanks in advance!

Hi @AdamD,

Welcome to the Auth0 Community!

According to this doc, Sort Search Results :

Sorting by app_metadata or user_metadata is not supported.

Root attribute limitations are listed here, User Profile Root Attributes

1 Like

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