# Configure Proxy so Grafana can speak to EntraID

**URL:** <https://community.grafana.com/t/configure-proxy-so-grafana-can-speak-to-entraid/156192>\
**Category:** Configuration\
**Created:** [August 14, 2025, 3:41pm UTC](https://community.grafana.com/t/configure-proxy-so-grafana-can-speak-to-entraid/156192 "2025-08-14T15:41:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcozin](https://avatars.discourse-cdn.com/v4/letter/m/aca169/32.png) [@marcozin](https://community.grafana.com/u/marcozin)\
**Post date:** [August 14, 2025, 3:41pm UTC](https://community.grafana.com/t/configure-proxy-so-grafana-can-speak-to-entraid/156192/1 "2025-08-14T15:41:28Z")

</div>

_[RHEL8 Grafana 12 Sitting behind a firewall installed via RPM - not Docker]_  
I’m in the middle of configuring Grafana to authenticate with EntraID using Home \> Administration \> Authentication \> Azure ID in the GUI.  
I think I’ve set it all up correctly 😕.

When I try to login using the EntraID signin button on the Grafana login page, it takes me to Entra to pass my credentials. However, when I’m passed back to Grafana I get the following:

> **Login failed**
> 
> Failed to get token from provider

Here’s the relevant output from the log:

```auto
logger=context userId=0 orgId=0 uname= t=2025-08-14T18:46:30.798156428+02:00 level=info msg="Request Completed" method=GET path=/login/azuread status=302 remote_addr= ****USER-IP-ADDRESS-REMOVED-FROM-POST**** time_ms=0 duration=88.195µs size=477 referer=https:// ****GRAFANA-URL-REMOVED-FROM-POST**** :3000/login handler=/login/:name status_source=server
logger=authn.service t=2025-08-14T18:46:31.292035091+02:00 level=error msg="Failed to authenticate request" client=auth.client.azuread error="[auth.oauth.token.exchange] failed to exchange code to token: Post \"https://login.microsoftonline.com/ ****TENANT-ID-REMOVED-FROM-POST**** /oauth2/v2.0/token\": dial tcp: lookup login.microsoftonline.com: no such host"
logger=context userId=0 orgId=0 uname= t=2025-08-14T18:46:31.3015948+02:00 level=info msg="Request Completed" method=GET path=/login/azuread status=302 remote_addr= ****USER-IP-ADDRESS-REMOVED-FROM-POST**** time_ms=18 duration=18.034049ms size=29 referer=https:// ****GRAFANA-URL-REMOVED-FROM-POST**** :3000/ handler=/login/:name status_source=server

```

The server sits behind our firewalls, so we’ve got a proxy that allows servers to speak to the relevant Microsoft sites for EntraID.

I suspect that I need to set that in Grafana somewhere?

I’ve searched through the documentation but (unless I’m misunderstanding it) the only stuff I can find is to use a reverse-proxy as an actual authentication method.

Where would I set our proxy details so Grafana can reach Microsoft?

Thanks in advance for any help you can offer 🙂

---

<div class="post-metadata">

**Author:** ![jangaraj](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/jangaraj/32/39197_2.png) [@jangaraj](https://community.grafana.com/u/jangaraj)\
**Post date:** [August 14, 2025, 5:16pm UTC](https://community.grafana.com/t/configure-proxy-so-grafana-can-speak-to-entraid/156192/2 "2025-08-14T17:16:12Z")

</div>

```auto
dial tcp: lookup login.microsoftonline.com: no such host

```

That looks like a DNS resolution problem.

Try to set the environment variables HTTP\_PROXY, HTTPS\_PROXY and NO\_PROXY (or the lowercase versions thereof) to configure a proxy.

---

<div class="post-metadata">

**Author:** ![marcozin](https://avatars.discourse-cdn.com/v4/letter/m/aca169/32.png) [@marcozin](https://community.grafana.com/u/marcozin)\
**Post date:** [August 15, 2025, 10:05am UTC](https://community.grafana.com/t/configure-proxy-so-grafana-can-speak-to-entraid/156192/3 "2025-08-15T10:05:33Z")

</div>

Hi @jangaraj  
I’d prefer not to set the proxy settings globally on the server. I’ve got some other things running on that box that shouldn’t be accessing them.  
Is there somewhere in a config file for Garafana i can set the proxy instead?

---

<div class="post-metadata">

**Author:** ![jangaraj](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/jangaraj/32/39197_2.png) [@jangaraj](https://community.grafana.com/u/jangaraj)\
**Post date:** [August 15, 2025, 10:22am UTC](https://community.grafana.com/t/configure-proxy-so-grafana-can-speak-to-entraid/156192/4 "2025-08-15T10:22:29Z")

</div>

> [@marcozin](#):
>
> I’d prefer not to set the proxy settings globally on the server

I didn’t recommend to set it globally. Grafana needs that, so set it for Grafana only. I guess it’s managed via systemd, so modify Grafana unit file and define proxy env variable there = proxy will be configured only for Grafana service. Check your OS doc for exact instructions.

---

<div class="post-metadata">

**Author:** ![marcozin](https://avatars.discourse-cdn.com/v4/letter/m/aca169/32.png) [@marcozin](https://community.grafana.com/u/marcozin)\
**Post date:** [August 15, 2025, 11:26am UTC](https://community.grafana.com/t/configure-proxy-so-grafana-can-speak-to-entraid/156192/5 "2025-08-15T11:26:12Z")

</div>

Doh. Sorry - long day and not thinking clearly.  
That sorted it.  
For anyone that’s interested…

Create a service override with:

`sudo systemctl edit grafana-server`

Add the environment variables to the contents like this:

`[Service]`  
`Environment="HTTP_PROXY=http://myproxyserver:8080"`  
`Environment="HTTPS_PROXY=http://myproxyserver:8080"`  
`Environment="NO_PROXY=*`_`.myinternaldomain1.internal,`_`*`_`.myinternaldomain1.internal"`_

This will create an override file in systemd

Reload & restart

`sudo systemctl daemon-reload`  
`sudo service grafana-server restart`
