triauth for GrafanaOIDC
Let your team open your Grafana dashboards with one approval on their own device, and no Grafana passwords.
- Sign-in through
- OpenID Connect bridge
- Available in
- All editions, self-hosted and cloud
- Set up in
- Administration › Authentication › Generic OAuth
About Grafana
Grafana shows the numbers from your servers, apps, and business systems as dashboards that everyone can read. Teams use it to watch what matters to them, from website traffic to sales, and to get an alert when something goes wrong. It runs on your own server or as a cloud service.
Connect Grafana to triauth
Grafana signs people in through the triauth OpenID Connect bridge. Once connected, Grafana's sign-in page shows a button with your domain's name. People on your team click it, type their username, and approve on their own device. Nobody keeps a Grafana password, and when someone leaves, removing their identity records at your domain ends their access to Grafana as well.
How it works
Open oidc.triauth.org and enter your domain.
Paste Grafana's redirect address,
https://grafana.example.com/login/generic_oauthwith your own Grafana address in place ofgrafana.example.com, and click Connect app. The bridge gives you a client ID and a client secret.In Grafana, open Administration › Authentication › Generic OAuth and enter the settings below, or add them to the
grafana.inifile and restart Grafana. Replaceexample.comwith your domain, and the two placeholders with the client ID and the client secret from the bridge.ini[auth.generic_oauth] enabled = true name = example.com client_id = <client ID from the bridge> client_secret = <client secret from the bridge> auth_url = https://oidc.triauth.org/example.com/authorize token_url = https://oidc.triauth.org/example.com/token api_url = https://oidc.triauth.org/example.com/userinfo scopes = openid email profile groups offline_access use_pkce = true use_refresh_token = true groups_attribute_path = groupsOpen Grafana's sign-in page and click the button with your domain's name.
Checkpoint
Grafana's sign-in page shows a new button with your domain's name. Choosing it opens a page from the bridge that asks for the username, and the person's authenticator asks them to approve.
Good to know
- Everyone with an identity at your domain gets a Grafana account the first time they sign in. To let only one team in, limit the app to a group when you connect it.
- New accounts start as viewers. Grafana can give the editor or admin role by group once you publish groups at your domain.
- Grafana renews the sign-in through the bridge while a person works, and signs them out when a renewal fails. So a session follows the identity. Grafana's own limits still apply, usually seven days without activity and 30 days in all. Signing in again takes one approval.
For the person who connects the app
| Setting | Value |
|---|---|
| Redirect address | https://<your-grafana>/login/generic_oauth |
| Where in Grafana | grafana.ini, section [auth.generic_oauth], or Administration › Authentication › Generic OAuth |
| Addresses | Grafana does not read the discovery document, so the authorization, token, and userinfo addresses go in one by one, as in the block above |
| Groups | groups_attribute_path = groups makes the groups published at your domain available to Grafana, and role_attribute_path can turn them into roles |
| Refresh | use_refresh_token = true together with offline_access in the scopes. Grafana's docs say that once access has been revoked, "the refresh will fail and the session will be invalidated". Roles and groups are mapped at sign-in only. Grafana also signs the person out when the bridge cannot be reached at a renewal |
Grafana takes one such connection per installation. Grafana's Generic OAuth guide explains every setting, including role mapping.
Next steps
- Read the OpenID Connect bridge page for what every connected app gets and what the bridge keeps private.
- Read Roll out to your team to give everyone in your organization an identifier at your domain.
- Read Groups to publish teams and give Grafana roles by group.
- Read Grafana's Generic OAuth guide for every setting Grafana offers.
All logos and trademarks belong to their respective owners and do not imply affiliation or endorsement of the organization or product by triauth, nor vice versa. The content provided on this page may include information from third-party sources. We do not assume any responsibility for the completeness, correctness, or applicability of the information. You should independently verify any details before relying on them.