Azure days for me and weird behavior when I was trying to enable some monitoring resources in an IoT Hub resource. In random times, I get an error similar to this one
The subscription ‘[subscription id]’ is not registered to use microsoft.insights.
And, it was weird because when I check the Resources providers available and registered for my subscription, the [microsoft.insights] appeared as [registered].
So, I tested a couple of reset scenarios, some other PowerShell scripts, and at the end the solution was the easiest one:
Unregister and Register again the provider.
5 minutes later, my monitoring capabilities were back available for me.
Again, it happened at random times, so there maybe an external factor also in this scenario.
More posts in my blog ElBruno.com.
More info in https://beacons.ai/elbruno
thnx, this helped. Can’t believe this bug exists even today.