OktaAPI Python list users returns only 200 users


I downloaded and setuo Python SDK from Github.

But when I am executing the below method, I am getting only 200 users from the whole organization of 30000+ users.

async def main():
    users, resp, err = await okta_client.list_users()
    for user in users:
        print(user.profile.first_name, user.profile.last_name)

loop = asyncio.get_event_loop()

Kindly someone help me to find out the issue


Our APIs implement pagination and most endpoints will by default return a max of 200 records. You can find an example of how to use pagination with the Python SDK in our README:

from okta.client import Client as OktaClient
import asyncio

async def main():
    client = OktaClient()
    users, resp, err = await client.list_users()
    while True:
        for user in users:
            print(user.profile.login) # Add more properties here.
        if resp.has_next():
            users, err = await resp.next()

loop = asyncio.get_event_loop()