How to Resolve the Resource Provider Not Registered In Subscription Error
Issue
You receive the following error message:
Subscription sub_id of remote Private Link Service /subscriptions/sub_id/resourceGroups/rg_name/providers/Microsoft.Storage/storageAccounts/storage_account_name is not registered with Microsoft.Network resource provider
Environment
- All database connectors
- Connection method: Private networking
Understanding the problem
- Azure resource providers: Every Azure service is managed by a provider. You must register a provider in a subscription before deploying or using its resources.
Microsoft.Networkprovider: Manages networking resources (Private Endpoints, Private Link Services, VNets, NSGs, etc.).
The error indicates you’re creating a Private Endpoint to the Storage account storage_account_name in subscription sub_id, but Microsoft.Network isn’t registered there. Even though the target is a Microsoft.Storage resource, Private Endpoint is a networking feature, so Microsoft.Network must be registered in that subscription.
Causes and solutions
The Microsoft.Network resource provider isn’t registered in the subscription hosting storage_account_name and possibly the subscription creating the Private Endpoint.
Register Microsoft.Network in the affected subscriptions, then retry the Private Endpoint creation.
Resolution
Register Microsoft.Network in the subscription that owns the target storage account (sub_id). You can register it through the Azure portal, Azure CLI, or Azure PowerShell.
Option 1: Azure Portal (recommended for ease of use)
- Sign in to the Azure portal.
- In the top search bar, type Subscriptions and open Subscriptions.
- Click the subscription that owns the storage account (
sub_idfrom the error). - In the left menu under Settings, select Resource providers.
- In Filter by name…, type
Microsoft.Network. - Check the Status column:
- If it shows NotRegistered, select Microsoft.Network and click Register at the top.
- The status changes to Registering, then to Registered (this can take a few minutes).
- (Optional) Repeat the search for
Microsoft.Storageto confirm it’s also registered. - Re-run the Private Endpoint creation.
Option 2: Azure CLI
- Open Azure Cloud Shell (Bash) or a local terminal with Azure CLI logged in.
- Set the subscription context:Replace
az account set --subscription "sub_id"sub_idwith the actual subscription ID from the error message. - Register the resource provider:
az provider register --namespace Microsoft.Network - (Optional) Verify registration:It should show
az provider show --namespace Microsoft.Network --query registrationStateRegistered.
Option 3: Azure PowerShell
- Open Azure Cloud Shell (PowerShell) or a local PowerShell session logged in to Azure.
- Set the subscription context:Replace
Set-AzContext -Subscription "sub_id"sub_idwith the actual subscription ID from the error message. - Register the resource provider:
Register-AzResourceProvider -ProviderNamespace Microsoft.Network - (Optional) Verify registration:It should show
Get-AzResourceProvider -ProviderNamespace Microsoft.Network | Select-Object ProviderNamespace, RegistrationStateRegistered.
Once the Microsoft.Network resource provider is successfully registered in the subscription of the target storage account, retry the operation that caused this error (for example, creating the Private Endpoint). It should now proceed without this specific error.