# Error after adding Azure monitor Data Source

**URL:** <https://community.grafana.com/t/error-after-adding-azure-monitor-data-source/80845>\
**Category:** Azure Monitor\
**Created:** [February 1, 2023, 1:38pm UTC](https://community.grafana.com/t/error-after-adding-azure-monitor-data-source/80845 "2023-02-01T13:38:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wizardywizard](https://avatars.discourse-cdn.com/v4/letter/w/ba9def/32.png) [@Wizardywizard](https://community.grafana.com/u/Wizardywizard)\
**Post date:** [February 1, 2023, 1:38pm UTC](https://community.grafana.com/t/error-after-adding-azure-monitor-data-source/80845/1 "2023-02-01T13:38:15Z")

</div>

- What Grafana version and what operating system are you using?  
open-source version deployed in a kubernetes cluster with prometheus
- **What** are you trying to achieve?  
I want to add Azure monitor as a data resource
- **How** are you trying to achieve it?  
I’ve created an app registration in Azure and assigned the Azure monitoring and Reader role to it
- What happened?  
When I fill in my Azure credentials in Grafana it can find my Azure subscription and gives a green light. But when I open a dashboard this appears:

Error updating options: The client ‘ **’ with object id '** ’ does not have authorization to perform action ‘microsoft.insights/metricNamespaces/read’ over scope ‘/subscriptions/ **/resourceGroups/** ;/providers/microsoft.insights’ or the scope is invalid. If access was recently granted, please refresh your credentials.

- What did you **expect** to happen?  
That I would be able to see my Azure metrics in the dashboard

- Can you copy/paste the configuration(s) that you are having problems with?

- Did you receive any errors in the Grafana UI or in related logs? If so, please tell us **exactly** what they were.

Error updating options: The client ‘ **’ with object id '** ’ does not have authorization to perform action ‘microsoft.insights/metricNamespaces/read’ over scope ‘/subscriptions/ **/resourceGroups/** ;/providers/microsoft.insights’ or the scope is invalid. If access was recently granted, please refresh your credentials.

- Did you follow any online instructions? If so, what is the URL?

[![](https://img.youtube.com/vi/BIK2i92vQFE/maxresdefault.jpg "Microsoft Azure Dashboard in Grafana - Tutorial") ](https://www.youtube.com/watch?v=BIK2i92vQFE)

[https://www.cognizantsoftvision.com/blog/how-to-integrate-azure-monitor-with-grafana/](https://www.cognizantsoftvision.com/blog/how-to-integrate-azure-monitor-with-grafana/)

---

<div class="post-metadata">

**Author:** ![Wizardywizard](https://avatars.discourse-cdn.com/v4/letter/w/ba9def/32.png) [@Wizardywizard](https://community.grafana.com/u/Wizardywizard)\
**Post date:** [February 1, 2023, 1:39pm UTC](https://community.grafana.com/t/error-after-adding-azure-monitor-data-source/80845/2 "2023-02-01T13:39:07Z")

</div>

In other articles I saw that you need to add the Reader role to Grafana in order to solve this, but this didn’t help for me.

---

<div class="post-metadata">

**Author:** ![Wizardywizard](https://avatars.discourse-cdn.com/v4/letter/w/ba9def/32.png) [@Wizardywizard](https://community.grafana.com/u/Wizardywizard)\
**Post date:** [February 2, 2023, 3:57pm UTC](https://community.grafana.com/t/error-after-adding-azure-monitor-data-source/80845/3 "2023-02-02T15:57:28Z")

</div>

My bad, I figured it out. I needed to assign the Reader role on the subscription level and not only on resource group level. Hopefully this will help someone else in the future.

---

<div class="post-metadata">

**Author:** ![bshea5](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/bshea5/32/29788_2.png) [@bshea5](https://community.grafana.com/u/bshea5)\
**Post date:** [February 2, 2023, 10:06pm UTC](https://community.grafana.com/t/error-after-adding-azure-monitor-data-source/80845/4 "2023-02-02T22:06:49Z")

</div>

Thanks, I was actually running into the same issue and you unstuck me.

---

<div class="post-metadata">

**Author:** ![drcorrell](https://avatars.discourse-cdn.com/v4/letter/d/cc9497/32.png) [@drcorrell](https://community.grafana.com/u/drcorrell)\
**Post date:** [February 9, 2023, 5:37pm UTC](https://community.grafana.com/t/error-after-adding-azure-monitor-data-source/80845/5 "2023-02-09T17:37:16Z")

</div>

I’ve been stuck for days on this. Thank you!

---

<div class="post-metadata">

**Author:** ![jenskloster](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/jenskloster/32/32631_2.png) [@jenskloster](https://community.grafana.com/u/jenskloster)\
**Post date:** [May 11, 2023, 2:01pm UTC](https://community.grafana.com/t/error-after-adding-azure-monitor-data-source/80845/6 "2023-05-11T14:01:02Z")

</div>

This also helped me.  
Is this behaviour by design?

We have a subscription where grafana don’t have (read-)access to all resources.  
It works fine with Logs and Azure Resource Graph, just not for metrics
