Grafana annon auth seperate orgs

Hey guys,

Hoping someone can help us, we’re trying to find out how to setup anonymous authentication for multiple orgs.

We have intentionally separate and segregated data sets in orgs for separate business divisions, and need to be able to provide anon access based on the passed orgid in the url.

We’ve managed to setup external authentication using a reverse proxy but we’re hitting the login screen whenever we use any orgid other than 1.

Hello @liamhill2001

How did you configure anonymous authentication?

To configure anonymous authentication for all organizations, simply leave the variable “[auth.anonymous] enabled = true” enabled, in the case of the “GF_AUTH_ANONYMOUS_ENABLED=true” container. This way it will be applied to all organizations. If you only want to use “org_name” in one organization, as shown below, remember to put the users’ role “org_role = Viewer”.

Configure Grafana authentication | Grafana documentation


Hey @bernardolankheet ,

Thanks for your response. It’s a bit complicated but we’re authenticating to our proxy using pre-existing cookies created via our intranet.

If i set
enabled = true

in grafana without setting a org_name, it just assumes it’s called “Main Org”. I can tell this by looking in the logs. With anon set to true and no org_name, i can see errors in the log saying Main Org not found when trying to access grafana.
logger=context userId=0 orgId=0 uname= t=2024-03-25T08:59:30.831008623+08:00 level=info msg= error=“[org.notFound] failed to get org by name: Main Org.” remote_addr= traceID=


I don’t really understand what you need and without many details about your configuration, it’s difficult to help.

From what it looks like, and without much detail, you will need to check your reverse proxy, it could be the one forcing org1. It is not very common to pass pre-existing cookies.

Can you describe your scenario better?