Search code examples
oktaokta-api

How do I get Okta to return a sorted API response?


I need Okta to return the resultset of /api/v1/apps/{{appId}}/users ordered by the created field. I see that I can filter: https://developer.okta.com/docs/reference/api/events/#filters. But how do I sort?


Solution

  • There is no sorting functionality available for Okta's Apps API according to Okta's forum and their online documentation. The Apps API is only capable of filtering: https://developer.okta.com/docs/reference/api/apps/#list-users-assigned-to-application. Sadly, this is the one I needed.

    However, as @Progman mentioned, Okta does support sorting on their User API: https://developer.okta.com/docs/reference/api/apps/#list-users-assigned-to-application