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

Steen Tøttrup picture Steen Tøttrup · Jan 29, 2016 · Viewed 10.9k times · Source

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.

Answer

johnnie mac picture johnnie mac · Apr 8, 2017

Just got this error message while trying to deploy through Visual Studio 2015. Upgrading to the latest Azure SDK, v2.9.6, fixed the problem.