Skip to content

Warn when results are truncated in Search-AzGraph #9759

@AndyHerb

Description

@AndyHerb

Description of the new feature

Currently, when a you run a query via Search-AzGraph but don't specify the -First parameter, the results are limited to the first 100 items (see https://github.com/Azure/azure-powershell/blob/master/src/ResourceGraph/ResourceGraph/Cmdlets/SearchAzureRmGraph.cs for source code details).

This is misleading and, in some circumstances can be problematic, as the user is unaware that a limit's been hit and truncation has occurred; i.e. When returning the number of items for billing purposes.

Proposed implementation details (optional)

Raise a warning when results are truncated, unless a supplementary switch (i.e. -Force or -SuppressTruncationWarning) has been specified. This should cover scenarios where no value has been specified for -First (and it's therefore defaulted to 100) and also where a user value has been specified but truncation has still occurred.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions