AzureUSGovernment; `az identity create`; NoRegisteredProviderFound API version `2021-09-30-preview` for type `userAssignedIdentities`
See original GitHub issueDescribe the bug
Error when using Az CLI v2.37.0
with API version 2021-09-30-preview
for type userAssignedIdentities
in AzureUSGovernment
cloud. The error happens when doing an az identity create ...
(see below).
Note: works correctly if using
Az CLI v2.36.0
Command Name
az identity create --subscription {} --name {} --resource-group {}
Errors:
(NoRegisteredProviderFound) No registered resource provider found for location 'usgov*****' and API version '2021-09-30-preview' for type 'userAssignedIdentities'. The supported api-versions are '2015-08-31-PREVIEW, 2018-11-30'. The supported locations are 'usgovvirginia, usgoviowa, usgovtexas, usgovarizona, usdodeast, usdodcentral'.
Code: NoRegisteredProviderFound
Message: No registered resource provider found for location 'usgov*****' and API version '2021-09-30-preview' for type 'userAssignedIdentities'. The supported api-versions are '2015-08-31-PREVIEW, 2018-11-30'. The supported locations are 'usgovvirginia, usgoviowa, usgovtexas, usgovarizona, usdodeast, usdodcentral'.
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
az cloud set --name AzureUSGovernment
az login
az extension update --name aks-preview
az identity create --subscription {} --name {} --resource-group {}
Expected Behavior
Should return a json payload of the created managed identity.
Environment Summary
Windows-10-10.0.19044-SP0
Python 3.10.4
Installer: MSI
azure-cli 2.37.0
Extensions:
account 0.2.3
aks-preview 0.5.75
Dependencies:
msal 1.18.0b1
azure-mgmt-resource 21.1.0b1
Additional Context
Issue Analytics
- State:
- Created a year ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Microsoft.ManagedIdentity userAssignedIdentities 2021-09-30 ...
This module allows you to create a user-assigned managed identity and a role assignment scoped to the resource group. Create an API Management ......
Read more >Use nested ARM template to provision User Assigned ...
Use nested ARM template to provision User Assigned Managed Identity and add access policy to key-vault from different subscription.
Read more >There is a new way to reference managed identity in ARM ...
First, we need to build a resource identifier using the resourceId template function. We then provide the apiVersion to use for that resource ......
Read more >Can't reference principalId of user assigned identity for key ...
I got the same error but I had forgotten to assign a managed identity to my resource in the ARM template like: "identity":...
Read more >Using Managed Identity to Securely Access Azure Resources
To enable MI using an ARM template we add an Identity section and set it to System Assign. { "apiVersion": "2016-08-01", "type": "Microsoft....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@aldass-snc This issue is caused by upgrading the api-version for
Microsoft.ManagedIdentity
in the latest profile. PR link https://github.com/Azure/azure-cli/pull/22284 Since CLI currently does not support setting different api-version for different clouds, so under the same profile, all clouds use the same api-version for easier maintenance. CLI only supports setting different api-version for different profiles.So we currently have two work arounds to bypass this problem:
2.36.0
az identity create
command, you can executeaz cloud set -n AzureUSGovernment --profile 2020-09-01-hybrid
to switch the profile. After creating identitites, then you can executeaz cloud set -n AzureUSGovernment --profile latest
to switch the latest profile back.@zhoxing-ms
We are in the progress of enabling sovereign clouds but don’t have any ETA yet.
@aldass-snc As far as I know the guidance for GA is to support all of them at once. However, this feature is in public preview and the guidance here for Fairfax is 30 days since public preview in public if I’m not mistaken.