The subscription is not registered to use namespace 'Microsoft.DataFactory error

冷暖自知 提交于 2019-11-30 18:06:29

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.

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>

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

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.

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.

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

From the portal, select All services.

Select Subscriptions.

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

For your subscription, select Resource providers.

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!