78

Going through this tutorial "Create a pipeline with Copy Activity using Visual Studio" and receiving this error when I hit publish.

Creating datafactory-Name:VSTutorialFactory,Tags:,Subscription:Pay-As-You-Go,ResourceGroup:MyAppGroup,Location:North Europe,

24/03/2016 11:30:34- Error creating data factory:
Microsoft.WindowsAzure.CloudException: MissingSubscriptionRegistration:
The subscription is not registered to use namespace 'Microsoft.DataFactory'.

The error is not mentioned anywhere.

rene
  • 41,474
  • 78
  • 114
  • 152
user964787
  • 1,127
  • 2
  • 11
  • 20

9 Answers9

116

You can also register resource providers under your subscription in the portal

enter image description here

Marcus Höglund
  • 16,172
  • 11
  • 47
  • 69
66

In Azure, for each functionality there's a resource provider (Microsoft.DataFactory for example).

By default, your Azure Subscription is not registered with all resource providers and because your Subscription is not registered with Microsoft.DataFactory resource provider, you're getting this error.

What you have to do is manually register your subscription with a resource provider. If you're using Azure PowerShell, you can use Register-AzureRmResourceProvider Cmdlet to achieve the same. You would need to use syntax like below:

Register-AzureRmResourceProvider -ProviderNamespace Microsoft.DataFactory

Once your Subscription is registered with this resource provider, this error will go away.

Gaurav Mantri
  • 128,066
  • 12
  • 206
  • 241
  • 7
    @Schneider believe so. If my memory serves me right, you would need to click on "Subscriptions" and then "Resource Providers". – Gaurav Mantri May 11 '17 at 06:25
  • @Schneider Yes, this can be done via "cloud shell" besides search text box on the header. – doganak Oct 21 '18 at 13:33
  • 1
    That's interesting. I'm wondering why we're required to register it manually. Are there any reasons and does doing so have any side effects? – ginomessmer Dec 19 '20 at 20:09
  • If others are getting this error for a different resource, then you can find the resource that you need to use in lieu of "Microsoft.DataFactory" at https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/azure-services-resource-providers – Toby Artisan Feb 01 '21 at 20:52
  • 3
    It would make sense to me that if a customer tries to create a resource that is not registered by default that Azure would automate that part of the process. If you dangle an enabled button or link in front of a user in the portal then it's a bad experience to be immediately met with an error and little explanation on how to fix it. Auto register, or disable the link with an explanation on how to enable it. – Fütemire Mar 17 '21 at 21:13
  • The modern version is obiously: `Register-AzResourceProvider -ProviderNamespace`. – Jari Turkia Nov 11 '22 at 10:53
49

The instructions here worked for me: https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-register-provider-errors#solution-3---azure-portal

From the portal, select All services.

enter image description here

Select Subscriptions.

enter image description here

From the list of subscriptions, select the subscription you want to use for registering the resource provider.

enter image description here For your subscription, select Resource providers.

enter image description here

Look at the list of resource providers, and if necessary, select the Register link to register the resource provider of the type you're trying to deploy.

enter image description here

enter image description here

Enrico
  • 2,734
  • 1
  • 27
  • 40
11

To achieve the same thing with the azure cli you just need to set

azure provider register Microsoft.DataFactory

In order for this to work you need to be executing under the arm config mode

azure config mode arm

and you need to make sure you have selected the appropriate account/subscription for this to be executed against

azure account list
azure account set <SubscriptionNameOrId>
Ricky Keane
  • 1,540
  • 2
  • 15
  • 21
9

You can use also az command-line tool

  • To register
az provider register --namespace Microsoft.DataFactory
  • Notes

Execute both commands before to log in and switch to the desired subscription

az login
az account set --subscription <name or id>
Jeferson Tenorio
  • 2,030
  • 25
  • 31
  • Apparently registering takes a while. You can follow the status, using `az provider show -n Microsoft.DataFactory` – user3613932 Aug 26 '20 at 23:38
8

My objective:

I wanted to create an auto shutdown schedule for my virtual machine in my Azure portal. Then I received the following error message:Schedule failed to update {"error":{"code":"MissingSubscriptionRegistration","message":"The subscription is not registered to use namespace 'Microsoft.DevTestLab'. See https://aka.ms/rps-not-found for how to register subscriptions.","details":[{"code":"MissingSubscriptionRegistration","target":"Microsoft.DevTestLab","message":"The subscription is not registered to use namespace 'Microsoft.DevTestLab'. See https://aka.ms/rps-not-found for how to register subscriptions."}]}}

What is the error message saying?

It is saying The subscription is not registered to use namespace '**Microsoft.DevTestLab**

How do I register that namespace?

  1. Click on the "Subscription" tab on Azure portal
  2. Select "Resource providers"
  3. Type the namespace you want to register in the search box
  4. click on the Register button
  5. It will take about 5 minutes to finish the registration and all set to go.

enter image description here

Goldfish
  • 624
  • 6
  • 11
2

Step 1.

az account list

Step 2.

az account set --subscription "Pago por uso"

Step 3.

az provider register --namespace Microsoft.DataFactory

Registering is still on-going. You can monitor using az provider show -n Microsoft.DataFactory

Sven Eberth
  • 3,057
  • 12
  • 24
  • 29
0

I had the same problem with exception:

Hyak.Common.CloudExceptionMissingSubscriptionRegistration: The subscription is not registered to use namespace 'Microsoft.DataFactory'.

I think this is a little bug in the way how Data Factory Provider is registered for subscription.

I fixed that by creating first Data Factory manually and then I was able to create next one automatically using:

DataFactoryManagementClient

Hopefully, it will be helpful for others working with Azure Data Factories.

adam.bielasty
  • 671
  • 9
  • 20
0

User PowerShell core and AZ 3.3.0 for me it worked:

Register-AzResourceProvider -ProviderNamespace Microsoft.Network