Azure-MG-Sub-Governance-Reporting
Azure-MG-Sub-Governance-Reporting copied to clipboard
Error processing policy definitions
v6.4.5
CodeRunPlatform Console
Describe the bug
Collecting custom data
CustomDataCollection ManagementGroups
9 Management Groups: mg-decommissioned, mg-landingzones, mg-landingzones-avd, mg-landingzones-cae, mg-landingzones-corp, mg-landingzones-online, mg-platform, mg-sandbox, mg-contoso
3 batches of Management Groups to process:
Batch#1 - 1 Management Groups: mg-contoso (CONTOSO)
Batch#2 - 4 Management Groups: mg-decommissioned (Decommissioned), mg-landingzones (Landing Zones), mg-platform (Platform), mg-sandbox (Sandbox)
Batch#3 - 4 Management Groups: mg-landingzones-avd (AVD), mg-landingzones-cae (CAE), mg-landingzones-corp (Corp), mg-landingzones-online (Online)
Processing Management Groups L1 (1 Management Groups)
Optimal batch size: 1
Processing data in 1 batches
[AzAPICall 1.2.1] 'Getting Policy definitions for Management Group: 'CONTOSO' ('mg-contoso')' uri='https://management.azure.com/providers/Microsoft.Management/managementgroups/mg-contoso/providers/Microsoft.Authorization/policyDefinitions?api-version=2021-06-01&$filter=policyType eq 'Custom'' Command 'ConvertFrom-Json' failed: Cannot convert the JSON string because it contains keys with different casing. Please use the -AsHashTable switch instead. The key that was attempted to be added to the existing key 'DeploymentScope' was 'deploymentScope'.
[AzAPICall 1.2.1] 'Getting Policy definitions for Management Group: 'CONTOSO' ('mg-contoso')' uri='https://management.azure.com/providers/Microsoft.Management/managementgroups/mg-contoso/providers/Microsoft.Authorization/policyDefinitions?api-version=2021-06-01&$filter=policyType eq 'Custom'' Trying command 'ConvertFrom-Json -AsHashtable'
[AzAPICall 1.2.1] 'Getting Policy definitions for Management Group: 'CONTOSO' ('mg-contoso')' uri='https://management.azure.com/providers/Microsoft.Management/managementgroups/mg-contoso/providers/Microsoft.Authorization/policyDefinitions?api-version=2021-06-01&$filter=policyType eq 'Custom'' Command 'ConvertFrom-Json -AsHashtable' succeeded. Please file an issue at the AzGovViz GitHub repository (aka.ms/AzGovViz) and provide a dump (scrub subscription Id and company identifyable names) of the resource (portal JSOn view) - Thank you!
[AzAPICall 1.2.1] 'Getting Policy definitions for Management Group: 'CONTOSO' ('mg-contoso')' uri='https://management.azure.com/providers/Microsoft.Management/managementgroups/mg-contoso/providers/Microsoft.Authorization/policyDefinitions?api-version=2021-06-01&$filter=policyType eq 'Custom'' Command 'ConvertFrom-Json -AsHashtable' failed
[AzAPICall 1.2.1] 'Getting Policy definitions for Management Group: 'CONTOSO' ('mg-contoso')' uri='https://management.azure.com/providers/Microsoft.Management/managementgroups/mg-contoso/providers/Microsoft.Authorization/policyDefinitions?api-version=2021-06-01&$filter=policyType eq 'Custom'' Command 'ConvertFrom-Json -AsHashtable' failed. Please file an issue at the AzGovViz GitHub repository (aka.ms/AzGovViz) and provide a dump (scrub subscription Id and company identifyable names) of the resource (portal JSOn view) - Thank you!
Exception: C:_code\other\Azure-MG-Sub-Governance-Reporting-6.4.5\pwsh\AzGovVizParallel.ps1:5733:9
Line |
5733 | $batchLevelGroupBatch | ForEach-Object -Parallel {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| throwing - Command ConvertFrom-Json -AsHashtable failed (different casing)