Grafana Version: 5.x
OS: Ubuntu 16
What we need to achieve
We have enabled google auth for the grafana user management, We have two organisation in the grafana
Default Org → org_id =1
Company Org → org_id = 2
We want when the users logging in user google, they should be redirected to Company Org i.e. org_id =2
Changes we made
I have tried setting up auto_assign_org=true
and auto_assign_org_id =2
in the users section of grafana.
What happened?
The users are still getting pointed to default org id 1 when logging using google auth
Note: If the users are logging directly on grafana without google auth, they are getting redirected to org_id 2
The users should be redirected to org_id 2.
We believe there should be the similar flags auto_assign_org
and auto_assign_org_id
somewhere in the auth.google config in grafana.ini
Configuration Used
[auth.google]
enabled = true
client_id = xxxxxxxxxxxxxxxx
client_secret = xxxxxxxxxxxxxx
scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
auth_url = https://accounts.google.com/o/oauth2/auth
token_url = https://accounts.google.com/o/oauth2/token
allowed_domains = xxx.in
allow_sign_up = true
allowed_organizations = xxx
org_name = xxx
[users]
;allow_sign_up = true
auto_assign_org = true
auto_assign_org_id = 2
;auto_assign_org_role = Viewer