I am using Users endpoint to search and sort users. I am able to sort by profile fields and created/activated, but it returns an error when I want to sort by lastLogin or lastUpdated.
I see the same problem on both API and SDK.
Error message: {"Invalid search criteria. (400, E0000031): Invalid search attribute."}
Successful request: {{oktaDomain}}/api/v1/users?search=profile.firstName sw "duygu"&sortBy=created
Failed request: {{oktaDomain}}/api/v1/users?search=profile.firstName sw "duygu"&sortBy=lastLogin
Documentation states that sortBy
can be any property.
So, isn’t all of the fields supported for sorting?
Thank you in advance.