Default role for all but one user using proxy auth

Hello,

I want to use proxy auth for authentication, then have only one user as admin, any other ones must be viewer, whatever is their login. Looking to the proxy auth code seems to indicate that roles are taken from LDAP when using proxy auth but I don’t have access to it. Is that possible to have proxy auth but only one member can admin / edit dashboards / create organization, all others can only see the default organization ?

Thank you.

K.

Hi,

Lets say that you create a user in Grafana with admin role that later will be connected to a user signing in through proxy auth - then this user will be the admin.

For all other users to get the role Viewer you’ll need to add some configuration to Grafana according to this post. Example:

############# Users ################
[users]
# disable user signup / registration
allow_sign_up = false

# Set to true to automatically assign new users to the default organization (id 1)
auto_assign_org = true

# Default role new users will be automatically assigned (if auto_assign_org above is set to true)
auto_assign_org_role = Viewer

Please try it out and let me know if that helps

Marcus

I want to set role to whatever role i have in my ldap and not the default on startup. How do i do that?