
User16557208570128759535 (Customer) asked a question.
I am trying sort records for users and groups, as per document
sortby supported for users and groups. but it is not working.
http://{subdomain}/api/v1/users?sortBy=profile.lastName&sortOrder=desc
http://{subdomain}/api/v1/groups?sortBy=lastUpdated&sortOrder=desc
Everytime getting same sequence.
could you please help to understand if anything wrong in api url the way i have done or it is not supported ?
Thank you.

Hello and Thank you for reaching out to the Okta Community!
According to the documentation the "sortBy" parameter Specifies field to sort by (for search queries only). sortBy can be any single property, for example sortBy=profile.name , so you might need to run a search and append the sortBy.
Example:
search=type+eq+%22OKTA_GROUP%22&sortBy=lastUpdated
If my answer helped, remember to mark it as best to increase its visibility for other members of the Okta Community who might have the same questions as you.
Hope my answer helps!
--
Help others in the community by liking or hitting Select as Best if this response helped you.