Search-AzGraph incorrect documentation
Description
I cannot report this problem in docs so I am reporting it here. Documentation about Search-AzGraph https://docs.microsoft.com/en-us/powershell/module/az.resourcegraph/search-azgraph?view=azps-3.5.0 is incorrect. For parameter First it says values are from 1 to 5000. That is not correct. Maximum value is 1000 and if you provide value like 5000 maximum 1000 will be returned and even error will not be logged. Documentation is misleading but also the behavior as well.
Steps to reproduce
Environment data
Module versions
Debug output
Error output
Thanks for reporting. The message is generated basing on validation attribute https://github.com/Azure/azure-powershell/blob/25bb16640b6b1c52deed575690ed91e918b53d20/src/ResourceGraph/ResourceGraph/Cmdlets/SearchAzureRmGraph.cs#L81
We need Resource Graph team to verify it
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc
Their documentation also has some contradictions: https://docs.microsoft.com/en-us/azure/governance/resource-graph/concepts/work-with-data
"First currently has a maximum allowed value of 5000."
"When it's necessary to break a result set into smaller sets of records for processing or because a result set would exceed the maximum allowed value of 1000 returned records, use paging. "
@slavizh the documentation is for the ARG API, and it's correct that the API returns maximum of 1000 records at a time. Also Powershell module document is correct as it pages through the resources to serve 5000 records. Sorry if it's causing confusion for you. Let us know if you've any suggestion for improving the product behavior or the documentation.
@chiragg4u Not sure if I understand the explanation. Search-AzGraph returns maximum 1000 entries even if you specify 5000. There is no paging there. It just returns max of 1000 entries. I have tested this where the query should have returned more than 1000. How do you get 5000 results if -First 5000?