Azure: MissingRegistrationForLocation: The subscription is not registered for the resource type 'XXXX' in the location 'YYYY'

Steen Tøttrup

This started out as a SubscriptionNotFound error.

var dnsClient = new DnsManagementClient(new Microsoft.Azure.TokenCloudCredentials(result.AccessToken));

var zone = dnsClient.Zones.CreateOrUpdate("someresourcegroup", "mydomain.com", new Microsoft.Azure.Management.Dns.Models.ZoneCreateOrUpdateParameters {
        IfNoneMatch = "*",
        Zone = new Microsoft.Azure.Management.Dns.Models.Zone {
            Name = "mydomain.com",
            Location = "northeurope"
        }
    });

Now I've fixed that, thanks to the reply on the original question. It's still the same code, and I have re-registered for the feature/provider with the follow powershell command:

Register-AzurermresourceProvider -ProviderNamespace Microsoft.Network

But that doesn't take an location parameter, and the error is about a resource in a location. What gives? And I have tried with "North Europe" instead of "northeurope", same result.

So what am I missing? Can't seem to find any data on this issue, not here and not on Google.

The complete error message is:

MissingRegistrationForLocation: The subscription is not registered for the resource type 'dnszones' in the location 'northeurope'. Please re-register for this provider in order to have access to this location.

Stopped Contributing

Azure DNS is a global service. Please try changing your location from northeurope to global. That should fix the error.

var zone = dnsClient.Zones.CreateOrUpdate("someresourcegroup", "mydomain.com", new Microsoft.Azure.Management.Dns.Models.ZoneCreateOrUpdateParameters {
        IfNoneMatch = "*",
        Zone = new Microsoft.Azure.Management.Dns.Models.Zone {
            Name = "mydomain.com",
            Location = "global"
        }
    });

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Subscription is not registered for the resource type 'component' in the location 'Central US' during azure deployment from VS15

getting 'API resource location is not registered' error with Azure pipeline cache task

error using azure devops api for python "API resource location is not registered"

How to grant subscription access to an azure registered application?

Azure PS Automation Provided subscription "xxxx" does not exists

create an azure resource group under a subscription with terraform

Unable to select Resource in "Create Event Subscription" in Azure

Azure SQL DB Error, This location is not available for subscription

Azure DevOps - Azure Resource Group Deployment: set value of subscription dynamically

Azure Functions: The binding type(s) 'eventHubTrigger' are not registered

Azure - What is the purpose of a resource group location?

AEM : How to get list of registered sling models using resource type

"User already registered" when signing in to Azure API Management Developer Portal with Azure Subscription Administrator

Why Azure Cloud Shell is creating resource group in default subscription?

Is there way to restrict resource access by other 'Owners' in the same Azure Subscription?

Moving Azure resource to new subscription - Migrating from BizSpark to BizSpark Plus

KQL Azure Workbook: Filtering AppInsights cross-resource query by subscription

Cross Subscription moving of specific Azure resource using Powershell

Resolving Description Resource Path Location Type errors

Grant permissions to resource in one subscription to application from another subscription? (Azure AD multitenant apps)

Azure Keyvault CLI error: The subscription is not registered to use namespace 'Microsoft.KeyVault'

Azure PS query to obtain resource providers registered specific to a given resource group

Why does my PublishPipelineArtifact@0 fail with "API resource location not registered"

Azure Resource Management API to directly return the number of resources within a subscription or resource group?

How to deploy a resource in a secondary location in an Azure Resource Manager Template when it is unavailable in the primary location?

Delete list of Azure Resource Groups in a subscription without confirmation using Azure ClI

ExpirationCounter in subscription resource

No resources of this type found under this subscription Azure Logic Apps

Azure Policy Assignment - Exclude Resource Type(s)