PowervRA
PowervRA copied to clipboard
Cmdlet can only return 100 objects regardless of the value from the Limit parameter
Steps to reproduce
- Populate a VRA infrastrcture with more than 100 custom groups.
- Execute a Cmdlet like
Get-vRAGroupPrincipal -Limit 999 -Verbose
- You will see that only the first 100 will be returned as a object when you count the members.
- If you execute the linked REST request like https://vraurl/identity/api/tenants/tenantname/groups?limit=999 the full list will be returned.
Expected behavior
Return every group specified in the VRA infrastructure and set the limit based on the -Limit parameter.
Actual behavior
The actual behavior is that only the first 100 groups will be returned and that the limit parameter is not working as expected.
Environment data
$PSVersionTable
Name Value
---- -----
PSVersion 6.1.3
PSEdition Core
GitCommitId 6.1.3
OS Microsoft Windows 10.0.17763
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
$vRAConnection
Server : https://vrafqdn
Token : sensitive
Tenant : tenantname
Username : username
APIVersion : 7.4
SignedCertificates : True
SslProtocol : Default
It is a limit of the rest API, using a rest client, you will also get this behavior even when trying to force a bigger limit you can use the following synthax to get around it: -limit "100&page=2" and increment the page number
@nuclear12 Thanks for your answer, however this project is a Powershell implementation to query the REST api.
Maybe this fix could be integrated by the maintainers of the repo.
@leander091 Old ticket, but this should be fixed with PR #232. Can this issue be closed?
@martin9700, This issue is related to vRA7 with an different API. So if this PR could be back-ported to the version of powerVRA (3.7.0) which support vRA7 then this issue could be closed.
I created in the past an draft of an own implementation of pagination support for vRA7. I am going to test my solution and contribute it if it is works as expected
Sounds good, I don't have access to vRA7 so wouldn't be able to help.