Get more than 200 users via powershell api

I am trying to do the following:

$PrevUserInfo = Invoke-Method GET “/api/v1/users?limit=10000”

However, I only get 200 users and I have well over 1000.

How can I do this in powershell?

Thanks
John

Okta will only return a maximum of 200 users per page, see docs.

If you need to get all users in your org, your Powershell script will need to be able to handle pagination. More details about how we implement pagination in our docs.

1 Like

Has anyone got an example of how to do this in powershell?

There are a couple of Proof of Concept Powershell scripts that support pagination that might be good to model your integration off of (these aren’t officially supported):

1 Like