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

azure_rm_aduser_info with all only lists up to 100 users #1447

Closed
kent007 opened this issue Feb 15, 2024 · 1 comment · Fixed by #1448
Closed

azure_rm_aduser_info with all only lists up to 100 users #1447

kent007 opened this issue Feb 15, 2024 · 1 comment · Fixed by #1448
Labels
bug Something isn't working has_pr PR fixes have been made medium_priority Medium priority

Comments

@kent007
Copy link
Contributor

kent007 commented Feb 15, 2024

SUMMARY

When requesting a listing of all users in the directory, the API responds with pages of 100 users at a time. The module does not parse any pages past the first, capping the maximum number of users returned at 100.

Examples of reading paged replies are given in the MS graph SDK docs

ISSUE TYPE
  • Bug Report
COMPONENT NAME

azure_rm_aduser_info

ANSIBLE VERSION
ansible [core 2.11.12]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['redacted', '/usr/share/ansible/plugins/modules']
  ansible python module location = redacted/venv/lib/python3.8/site-packages/ansible
  ansible collection location = /redacted/.ansible/collections:/usr/share/ansible/collections
  executable location = /redacted/venv/bin/ansible
  python version = 3.8.0 (default, Dec  9 2021, 17:53:27) [GCC 8.4.0]
  jinja version = 3.1.2
  libyaml = True
COLLECTION VERSION
$ ansible-galaxy collection list azure.azcollection

# /redacted/.ansible/collections/ansible_collections
Collection         Version
------------------ -------
azure.azcollection 2.1.0
CONFIGURATION
N/A
OS / ENVIRONMENT

Ubuntu 18.04

STEPS TO REPRODUCE
# call on a tenant with more than 100 users in the directory
azure.azcollection.azure_rm_aduser_info:
  all: true
EXPECTED RESULTS

The full listing of the directory should be returned, even if this is very large.

ACTUAL RESULTS

The response is capped at 100 users, since additional pages are not parsed.


@kent007
Copy link
Contributor Author

kent007 commented Feb 15, 2024

at a glance this also applies to another module that support the all argument, adgroup_info

@Fred-sun Fred-sun added ready_for_review The PR has been modified and can be reviewed and merged bug Something isn't working has_pr PR fixes have been made medium_priority Medium priority and removed ready_for_review The PR has been modified and can be reviewed and merged labels Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working has_pr PR fixes have been made medium_priority Medium priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants