Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE] ziaclienthelper.list_users() does not respect pagesize argument #230

Open
CKroes97 opened this issue Jan 2, 2025 · 1 comment
Open

Comments

@CKroes97
Copy link

CKroes97 commented Jan 2, 2025

Description
The issue is twofold. First of all the docstrings for zscaler/zia/users.py statee that list_users() takes a page_size argument. This argument throws an error but a pagesize argument (without _ ) is accepted. This argument is also the one defined in zscaler/zia/__init__.py

But when a pagesize is given, the returned page has a size of 100, regardless of the pagesize. Because the returned page is smaller than the pagesize the SDK als immediately stops retrieving additional pages.

The affected tenant has a lot of users so it is not the case that there are only a hundred users.

Reproduction
all_users = zia.users.list_users(pagesize=200)

Expected behavior
Any pagesize of lengths 100 - 10,000 will return in pages being returned of that size. The SDK keeps retrieving pages of that size untill all users are retrieved.

Is it a regression?
This is the first time we are trying this using the SDK

Debug Logs
Logs can be provided through ticket if required

Other Information

  • OS: Windows
  • SDK Version: 0.10.1

Additional context
N.A

@Cacostass
Copy link

Hello, I was on the way to open the same issue.
I have encountered this paging issue across all zia functions. Same limitation, the page size is fixed in 100. I need this to be fixed to be able to extract all users in my organization.
I also noticed that there is not start page argument, that would help start from a certain point when the rate limit is reached and the token expires after waiting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants