OKTA oauth2 integration - Grafana 400 Bad request

Hi Team,

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

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

Can someone help me with the above issue?

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.

1 Like

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

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.

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

SignIN URL: https://10.12.108.17:443/graph/login/okta

SignOUT URL: https://10.12.108.17:443/graph/logout

Still I am facing the same issue.

@thiagorodrigues Can you please help me with the above?