# OKTA oauth2 integration - Grafana 400 Bad request

**URL:** <https://community.grafana.com/t/okta-oauth2-integration-grafana-400-bad-request/148069>\
**Category:** Authentication\
**Created:** [April 9, 2025, 2:58pm UTC](https://community.grafana.com/t/okta-oauth2-integration-grafana-400-bad-request/148069 "2025-04-09T14:58:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![naresh9999](https://avatars.discourse-cdn.com/v4/letter/n/d2c977/32.png) [@naresh9999](https://community.grafana.com/u/naresh9999)\
**Post date:** [April 9, 2025, 2:58pm UTC](https://community.grafana.com/t/okta-oauth2-integration-grafana-400-bad-request/148069/1 "2025-04-09T14:58:33Z")

</div>

Hi Team,

I have followed the below documentation and enabled the OKTA OAuth2 authentication using the Grafana UI console.

> **[Configure Okta OIDC authentication | Grafana documentation](https://grafana.com/docs/grafana/latest/setup-grafana/configure-security/configure-authentication/okta/)**
>
> Grafana Okta OIDC Guide

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/e/3/e3864904731d6deaab22771c70b25b6cc22374e9.png)

But I am getting the below error. Can someone help me to fix the below error?

Your request resulted in an error. The ‘redirect\_uri’ parameter must be a Login redirect URI in the client app settings

---

<div class="post-metadata">

**Author:** ![naresh9999](https://avatars.discourse-cdn.com/v4/letter/n/d2c977/32.png) [@naresh9999](https://community.grafana.com/u/naresh9999)\
**Post date:** [April 10, 2025, 1:19pm UTC](https://community.grafana.com/t/okta-oauth2-integration-grafana-400-bad-request/148069/4 "2025-04-10T13:19:04Z")

</div>

Can someone help me with the above issue?

---

<div class="post-metadata">

**Author:** ![pooh](https://avatars.discourse-cdn.com/v4/letter/p/f05b48/32.png) [@pooh](https://community.grafana.com/u/pooh)\
**Post date:** [April 10, 2025, 1:38pm UTC](https://community.grafana.com/t/okta-oauth2-integration-grafana-400-bad-request/148069/5 "2025-04-10T13:38:01Z")

</div>

If somebody can help, and has time to respond, they will.

Please do not clutter the archive with repeated requests for the same thing.

Antony.

---

<div class="post-metadata">

**Author:** ![thiagorodrigues](https://avatars.discourse-cdn.com/v4/letter/t/9fc348/32.png) [@thiagorodrigues](https://community.grafana.com/u/thiagorodrigues)\
**Post date:** [April 10, 2025, 11:45pm UTC](https://community.grafana.com/t/okta-oauth2-integration-grafana-400-bad-request/148069/6 "2025-04-10T23:45:54Z")

</div>

Under “Login redirect URIs”, add the exact URI Grafana is using. This should be:

[https://your-grafana-domain/login/okta](https://your-grafana-domain/login/okta)

- Ensure there are no trailing slashes or extra characters that could cause a mismatch
- Save your OKTA application settings
- If using Grafana with a custom root\_url configuration, make sure your redirect URI includes this path  
This error happens because OAuth2 security requires the exact redirect URI to be pre-registered with the identity provider to prevent redirect attacks.

---

<div class="post-metadata">

**Author:** ![naresh9999](https://avatars.discourse-cdn.com/v4/letter/n/d2c977/32.png) [@naresh9999](https://community.grafana.com/u/naresh9999)\
**Post date:** [April 12, 2025, 6:43pm UTC](https://community.grafana.com/t/okta-oauth2-integration-grafana-400-bad-request/148069/7 "2025-04-12T18:43:44Z")

</div>

Hi @thiagorodrigues

I am using my root url like below.

root\_url = https://%(domain)s/graph

And I have configured the OKTA urls like below.

Initiate URL: [https://10.12.108.17:443/graph/login](https://10.12.108.17:443/graph/login)

SignIN URL: [https://10.12.108.17:443/graph/login/okta](https://10.12.108.17:443/graph/login/okta)

SignOUT URL: [https://10.12.108.17:443/graph/logout](https://10.12.108.17:443/graph/logout)

Still I am facing the same issue.

---

<div class="post-metadata">

**Author:** ![naresh9999](https://avatars.discourse-cdn.com/v4/letter/n/d2c977/32.png) [@naresh9999](https://community.grafana.com/u/naresh9999)\
**Post date:** [April 15, 2025, 4:18am UTC](https://community.grafana.com/t/okta-oauth2-integration-grafana-400-bad-request/148069/8 "2025-04-15T04:18:00Z")

</div>

@thiagorodrigues Can you please help me with the above?
