Log Analytics: ‘Subscription’ is not registered to use microsoft.insights

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.

Click here to contact me to request help for your Microsoft cloud projects or a training for your Microsoft cloud poroducts.

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:

Log Analytics
Connecting a Log Analytics workspace

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).

Resource providers of an Azure subscription

In this long list, find the entry microsoft.insights and register the provider like shown below:

Finding the microsoft.insights resource provider for an Azure subscription

Select this provider and select Register from the top menu:

Register a new provider on an Azure subscription

Now wait for approximately 5 minutes and you will be able to connect a Log Analytics workspace to a resource inside your subscription.

Published by Andreas

Founder of M365 Evangelists Cloud-Architect, Strategy Consultant, Consultant for Microsoft technologies, Graph API enthusiast, PowerShell enthusiast
%d bloggers like this: