Open PaulHCode opened 2 months ago
This is now fixed: the new API version is rolled out: please retry. IMPORTANT: it will only work from a clean shell. The same issue will continue to repro in any shell that loaded the Az.Resources/Az.Accounts modules prior to the new API version rollout.
Description
In AzureUSGovernment tenants Get-AzPolicyAssignment returns:
Get-AzPolicyAssignment_Get1: C:\PowerShell\Modules\Az.Resources\7.1.0\Policy.Autorest\custom\Get-AzPolicyAssignment.ps1:260 Line | 260 | $scriptCmd = {& $wrappedCmd @calledParameters} | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | The resource type 'policyassignments' could not be found in the namespace 'microsoft.authorization' for api | version '2023-04-01'. The supported api-versions are | '2015-10-01-preview,2016-04-01,2016-12-01,2017-06-01-preview,2018-03-01,2018-05-01,2019-01-01,2019-06-01,2019-09-01,2020-03-01,2020-08-01,2020-09-01,2021-06-01,2022-06-01'.
This worked in previous versions of the module in AzureUSGovernment.
Issue script & Debug output
Environment data
Module versions
Error output