JulianHayward / Azure-MG-Sub-Governance-Reporting

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
857 stars 308 forks source link

Azure China issue: The resource type 'pricings' could not be found in the namespace 'Microsoft.Security' #244

Closed cajohanikea closed 4 months ago

cajohanikea commented 4 months ago

AzGovViz version 6.4.4

CodeRunPlatform GitHub Action

Describe the bug After the api version change to 2024-01-01 for microsoft.security an error is raised for Azure China: (StatusCode: '404' (NotFound)) <.code: ''> <.error.code: 'InvalidResourceType'> | <.message: ''> <.error.message: 'The resource type 'pricings' could not be found in the namespace 'Microsoft.Security' for api version '2024-01-01'. The supported api-versions are '2023-01-01,2022-03-01,2018-06-01,2017-08-01-preview'.'> - unhandledErrorAction: Stop

JulianHayward commented 4 months ago

@cajohanikea thanks for reporting. Can you check the dev branch this should fix the issue. See that last var APIMappingCloudEnvironment in the param block

cajohanikea commented 4 months ago

@JulianHayward That looks really good!

JulianHayward commented 4 months ago

great - closing