Azure Governance Visualizer aka AzGovViz is a PowerShell script that captures Azure Governance related information such as Azure Policy, RBAC (a lot more) by polling Azure ARM, Storage and Microsoft Graph APIs.
MIT License
817
stars
295
forks
source link
SecureScore fails when more than one value is returned by api #176
5/7 Subscriptions processed
InvalidOperation:
Line |
16 | … $secureScorePercentageRounded = [math]::Round(($subASCSec …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Method invocation failed because [System.Object[]] does not contain a method named 'op_Division'.
This happens when one of the suscriptions in current scope returns more than one value
for a call to secureScores API (function dataCollectionASCSecureScoreSub)
Additional context
The scureScores API for the subscription mentioned above will return something like
v6_major_20230323_1 please only report bug if you are running the latest version of AzGovViz
Console e.g. Console, Azure DevOps, GitHub Action, Cloud Shell, GitHub CodeSpaces ..
Describe the bug
The Script Fails when running command
the following Error is thrown
This happens when one of the suscriptions in current scope returns more than one value for a call to secureScores API (function dataCollectionASCSecureScoreSub)
Additional context The scureScores API for the subscription mentioned above will return something like