Skip to content

Microsoft.Network Resource Provider "Subscription is not registered with NRP." #26489

@ugreg

Description

@ugreg

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Checked and did not see any under these terms: https://github.com/Azure/azure-cli/issues?q=is%3Aissue+is%3Aopen+NRP

Related command
I am unable to use my subscription when running an mg deployment command like. az deployment mg create --name $name --location $location --template-file $file --management-group-id $mgid --parameters networkingSub=$networkingSub.

Describe the bug
I am unable to use my subscription when running an mg deployment command like. az deployment mg create --name $name --location $location --template-file $file --management-group-id $mgid --parameters networkingSub=$networkingSub. The subscription is created using bicep.

Even when running the command to register my networking subscription with the networking resource provider using az provider register --namespace 'Microsoft.Network' --subscription $networkingSub, I still face this subscription is not registered with NRP error even with retry logic in place. When using other resource provdiers like az provider register --namespace 'Microsoft.AnyType' --subscription $subscriptionId, I have no issues and the registration happens without fail.

To Reproduce

  1. Create a subscription using bicep.
  2. Try to interact with this subscription by adding it to a Management Group and deploy some networking resources in a resource group underneath this subscription.

Expected behavior
The Microsoft.Network resource provider should register without issue and I should be able to deploy networking resources underneath this subscription.

When using Azure PowerShell I see the expected behavior when trying to register this subscription with the Microsoft.Network resource provider. No issues are faced with Azure PowerShell and no retry logic is needed.

Set-AzContext -Subscription "$networkingSub"
Register-AzResourceProvider -ProviderNamespace Microsoft.Network

Environment summary
Locally deployed using Windows.

Metadata

Metadata

Assignees

Labels

ARMaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupAuto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamact-identity-squadquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions