When you try to add a subscription to a Log Analytics workspace, an error appears, that this subscription is not registered for a service called ‘microsoft.insights’. This article explains how to fix this.
All you need is appropriate permissions (e.g. owner) on the subscription, you need to modify. When you now navigate to your subscription and add a component to Log Analytics (e.g. an Azure Automation Runbook), like this:
When you save this, an error comes up:
Failed to update diagnostics for ”.{“code”:”SubscriptionNotRegistered”,”message”:”The subscription ‘000000-0000-0000-0000-0000000000’ is not registered to use “microsoft.insights”}.
Error in Microsoft Azure
This sounds weird on first sight. But the solution is easy, the parent subscription (that is containing the affected resource) is not enabled to be connected to Log Analytics. This can be changed in the subscription itself. Navigate to the subscription and choose Resource providers. Here you see a long list of providers (services), a subscription can use (or not).
In this long list, find the entry microsoft.insights and register the provider like shown below:
Select this provider and select Register from the top menu:
Now wait for approximately 5 minutes and you will be able to connect a Log Analytics workspace to a resource inside your subscription.
You must be logged in to post a comment.