How can I use pagination while using listUsers JAVA API?

Hi Team,

I’m querying the list of users using listUsers(s1, s2, s3, s4, s5) JAVA API. How can I use this to get paginated results? Say set the page size to 50, and goto next page, etc.
Similar to using limit parameter on REST API.


Are you using List Users API?

@dhanuj Our SDKs handle pagination for you, see docs: GitHub - okta/okta-sdk-java

Are you not getting the complete list of users back when you use listUsers?

I’m using the JAVA API from SDK

Yes I get the complete list.
In my portal say I want to display 10 results per page.
I get the UserList as client.listUsers(s1, s2, s3, s4, s5); .
I’m not sure how I get the first 10, next 10, etc.

Are you suggesting that if I do something like - - this automatically handles pagination on the server side ?

@andrea can you please confirm?