Resource Provider Not Registered Errors in Azure

When you try to create an Azure resource and receive “The subscription is not registered to use namespace,” the resource provider for that service has not been registered in your subscription. This page explains what resource providers are, how to register them, and how to automate registration for new subscriptions.

What resource providers are and why they need registration

Every Azure service is exposed through a resource provider — a namespace that groups related resource types. For example, Microsoft.Compute provides virtual machines and disks, while Microsoft.ContainerService provides AKS clusters.

The full error message looks like this:

The subscription is not registered to use namespace 'Microsoft.ContainerService'.
See https://aka.ms/rps-not-found for how to register subscriptions.

Or in a Terraform deployment:

Error: compute.VirtualMachinesClient#CreateOrUpdate: Failure sending request:
StatusCode=409 -- Original Error: Code="MissingSubscriptionRegistration"
Message="The subscription is not registered to use namespace
'Microsoft.Compute'. See https://aka.ms/rps-not-found for how to register
subscriptions."

Registration is required because Azure tracks which services a subscription has agreed to use. Some providers auto-register when you use the portal (the portal registers on your behalf), but CLI, Terraform, ARM templates, and SDKs do not auto-register — they fail if the provider is not already registered.

Note

Some commonly used providers like Microsoft.Resources and Microsoft.Authorization are registered automatically for all subscriptions. Others, especially newer services or preview features, require explicit registration.

Checking registration status

List all providers and their registration status:

az provider list --output table

Filter to see only unregistered providers:

az provider list \
  --query "[?registrationState=='NotRegistered'].{Namespace: namespace, State: registrationState}" \
  --output table

Check the status of a specific provider:

az provider show \
  --namespace Microsoft.ContainerService \
  --query "{namespace: namespace, state: registrationState}" \
  --output json

Output when not registered:

{
  "namespace": "Microsoft.ContainerService",
  "state": "NotRegistered"
}

Output when registered:

{
  "namespace": "Microsoft.ContainerService",
  "state": "Registered"
}
</section>

<section class="content-section" aria-labelledby="rp-register">
<h2 id="rp-register">Registering a resource provider</h2>

Register a single provider:

```bash
az provider register --namespace Microsoft.ContainerService

Registration is asynchronous. Poll until it completes:

# Poll every 10 seconds until Registered
while true; do
  STATE=$(az provider show \
    --namespace Microsoft.ContainerService \
    --query registrationState -o tsv)
  echo "$(date): $STATE"
  if [ "$STATE" = "Registered" ]; then
    echo "Registration complete."
    break
  fi
  sleep 10
done

Register multiple providers commonly needed for a full Azure environment:

PROVIDERS=(
  "Microsoft.Compute"
  "Microsoft.ContainerService"
  "Microsoft.ContainerRegistry"
  "Microsoft.DBforPostgreSQL"
  "Microsoft.DBforMySQL"
  "Microsoft.DocumentDB"
  "Microsoft.EventHub"
  "Microsoft.KeyVault"
  "Microsoft.ManagedIdentity"
  "Microsoft.Network"
  "Microsoft.OperationalInsights"
  "Microsoft.ServiceBus"
  "Microsoft.Sql"
  "Microsoft.Storage"
  "Microsoft.Web"
  "Microsoft.Cache"
  "Microsoft.Cdn"
  "Microsoft.Logic"
  "Microsoft.ApiManagement"
  "Microsoft.Search"
)

for PROVIDER in "${PROVIDERS[@]}"; do
  echo "Registering $PROVIDER..."
  az provider register --namespace "$PROVIDER" --wait
  echo "$PROVIDER: $(az provider show --namespace $PROVIDER --query registrationState -o tsv)"
done

The --wait flag blocks until registration completes for each provider before moving to the next.

Commonly needed providers by workload type

Different workload types require different providers. Below are the most commonly missing ones grouped by scenario.

Container and Kubernetes workloads:

az provider register --namespace Microsoft.ContainerService  # AKS
az provider register --namespace Microsoft.ContainerRegistry # ACR
az provider register --namespace Microsoft.ContainerInstance # ACI

Data and analytics workloads:

az provider register --namespace Microsoft.Sql               # Azure SQL
az provider register --namespace Microsoft.DocumentDB        # Cosmos DB
az provider register --namespace Microsoft.Synapse           # Synapse Analytics
az provider register --namespace Microsoft.DataFactory       # Data Factory
az provider register --namespace Microsoft.EventHub          # Event Hubs
az provider register --namespace Microsoft.StreamAnalytics   # Stream Analytics

Monitoring and observability:

az provider register --namespace Microsoft.OperationalInsights  # Log Analytics
az provider register --namespace Microsoft.Insights             # Azure Monitor
az provider register --namespace Microsoft.AlertsManagement     # Alerts

Security and identity:

az provider register --namespace Microsoft.KeyVault             # Key Vault
az provider register --namespace Microsoft.ManagedIdentity      # Managed Identities
az provider register --namespace Microsoft.Security             # Defender for Cloud

Automating registration in Terraform

Terraform’s azurerm provider can register resource providers automatically if skip_provider_registration = false (the default). However, this requires the service principal to have the registration permission, and it only registers providers that Terraform resources directly use.

For more control, use the azurerm_resource_provider_registration resource:

resource "azurerm_resource_provider_registration" "container_service" {
  name = "Microsoft.ContainerService"
}

resource "azurerm_resource_provider_registration" "container_registry" {
  name = "Microsoft.ContainerRegistry"
}

resource "azurerm_kubernetes_cluster" "main" {
  # ... AKS configuration ...

  depends_on = [
    azurerm_resource_provider_registration.container_service
  ]
}

The depends_on ensures provider registration completes before Terraform attempts to create the AKS cluster.

Alternatively, disable Terraform’s automatic registration and manage it separately:

provider "azurerm" {
  features {}
  skip_provider_registration = true
}

With skip_provider_registration = true, Terraform will not attempt to register any providers and will fail immediately if the required provider is not already registered. This is useful when the Terraform service principal does not have registration permissions and you want to manage registration through a separate process.

Tip

For new subscriptions, run the bulk registration script as part of your subscription onboarding automation before any Terraform deployments run. This avoids registration failures mid-deployment and eliminates the need for the Terraform service principal to have registration permissions.

Unregistering providers

You can unregister providers that are no longer needed, though this is rarely done in practice:

az provider unregister --namespace Microsoft.ContainerService

Unregistering a provider while resources of that type still exist in the subscription will cause management plane operations on those resources to fail. Azure will warn you but allow the unregistration. Only unregister providers when all resources of that type have been deleted from the subscription.

Common mistakes

  1. Assuming portal registration carries over to new subscriptions. Resource provider registration is per-subscription. Creating a new subscription for a new environment means all providers start unregistered, even if the same providers are registered in the organization’s existing subscriptions.
  2. Not waiting for registration to complete before deploying. Running az provider register and immediately running terraform apply will still fail because registration takes minutes. Use —wait or poll the registration state before proceeding.
  3. Using Reader role for a service principal that needs to register providers. Reader does not include registration permissions. The service principal running Terraform or deployment scripts needs at least Contributor to register resource providers.
  4. Forgetting Microsoft.OperationalInsights when deploying AKS with monitoring. AKS with Container Insights enabled requires both Microsoft.ContainerService and Microsoft.OperationalInsights. Forgetting the Log Analytics provider causes the AKS deployment to fail at the monitoring configuration step, not at the cluster creation step.

Frequently asked questions

Why does resource provider registration fail with "Authorization failed"?

Registering a resource provider requires the Microsoft.Support/register/action permission, which is part of the Contributor and Owner roles. Reader role does not include registration permissions. Assign at least Contributor to the user or service principal attempting the registration.

How long does resource provider registration take?

Most registrations complete in under 5 minutes. A few providers (notably Microsoft.Cdn and Microsoft.ContainerService) can take up to 10–15 minutes. Poll the status with az provider show --namespace Microsoft.Compute --query registrationState until it shows "Registered".

Do I need to register providers in every subscription?

Yes. Resource provider registration is per-subscription. A provider registered in subscription A is not automatically registered in subscription B. In multi-subscription environments, automate registration with a script or Terraform resource as part of subscription onboarding.

Last verified: 19 March 2026 Cloud services change frequently. Verify details against official documentation before making infrastructure decisions.