How to Get 2nd page Result for Users using okta sdk for .net

Hi friends,
Please help anyone how to do I have 10000 recording okta am using okta SDK for dotnet.

Code:
var lstUsers = oktaClient.GetUsersClient().GetList(null, reconschd.PageSize, filter).Results.AsEnumerable().ToList();

Meta:
public virtual PagedResults GetList(Uri nextPage = null, int pageSize = 200, FilterBuilder filter = null, SearchType searchType = Core.SearchType.Filter, string query = null, string after = null, DateTime? startDate = null);

Questions is how to pass Uri nextPage for getting 2nd-page result

Thanks in advance.

please feel free to ping me any time if u have any quires.

Jaideepvid@gmail.com

It looks like you’re using an older version of the .NET management SDK, and per the older docs, you can do the following to get the full list of users.

// Loop through pages, 100 users at a time
Uri nextPage = null;
PagedResults<User> users;

do
{
    users = usersClient.GetList(pageSize: 100, nextPage: nextPage);

    foreach (var user in users.Results)
    {
        // Perform user action
    }

    nextPage = users.NextPage;
}
while (!users.IsLastPage);

I do want to mention that this version of the management SDK is deprecated and newer versions handle pagination for you, so you may want to look into upgrading.