Skip to content
Tutorials Center
My learning

Topics

Lesson 34 of 37 ยท Administration and Provisioning

Grafana Users, Teams, Organizations, Roles and Permissions

Control who can see and change what in Grafana: organizations, basic roles, teams, folder and dashboard permissions, service accounts, RBAC and authentication providers.

A Grafana instance often serves many people with different needs: developers who build dashboards, managers who only read them, and automation that must call the API. Access control keeps the right people in and the wrong changes out. This lesson explains the building blocks: organizations, users, roles, teams, folder permissions, service accounts and the ways users sign in.

Grafana is not available here, so we describe the screens and settings in words. The runnable blocks are Python stand-ins that compute effective permissions, to make the rules easy to experiment with. Details of the enterprise role-based access control (RBAC) vary by edition and version, so check your edition's documentation.

Organizations

An organization (org) is a hard boundary inside one Grafana server. Each org has its own dashboards, data sources, folders, teams, alert rules and API keys or service accounts. Users can belong to several orgs with a different role in each, and switch between them from the profile menu. Most installations use a single org (the default, Main Org.). Use extra orgs for strong separation, such as a hosting provider keeping customers apart, and teams plus folders when you only need to organize people in one company.

Roles

Within an org, each user has one basic role:

Role Can do
Admin Everything in the org: manage users, data sources, teams, plugins, settings
Editor Create and edit dashboards and folders and alert rules; cannot manage users or data sources
Viewer View dashboards and Explore (depending on settings); cannot save changes
No basic role No default permissions; access comes only from explicit permissions

There is also the Grafana server admin flag (isGrafanaAdmin), which is separate from org roles: it lets a user manage all orgs and all users on the server (Administration > General > Users and orgs).

Teams

A team groups users so you can give permissions to the group instead of to each person. Create a team in Administration > Users and access > Teams, add members (with the option to make some team admins), and then use the team in folder and dashboard permissions, in preferences (default dashboard for the team) and as the target of notification routing in some setups. Teams can be filled automatically from the identity provider (team sync, with LDAP, or group mapping in some OAuth providers, depending on edition and version).

Folder and dashboard permissions

Folders are the main way to organize and secure dashboards. Each folder has a permissions list; each entry gives a user, team or basic role one level:

  • View: see the folder's dashboards.
  • Edit: change dashboards, create new ones.
  • Admin: also change the folder's permissions.

Permissions are inherited: dashboards and nested folders get the folder's permissions unless you grant additional ones on them (which adds, never removes, in the model most editions use). A user's effective permission is the highest level among everything that applies to them: their own entry, any team entries, and their org role. Defaults commonly give the Viewer and Editor roles view and edit on every folder; remove those defaults in sensitive folders and grant by team instead.

Python Stand-in: effective permission in a folder

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Ana is only a Viewer in the org, but her team gives her edit rights in this folder. Bo has no access at all. Cy, an Editor, only gets view because the folder entry replaced the broad default.

Role-based access control (RBAC)

In Grafana Enterprise and Grafana Cloud (and for some features in OSS), RBAC extends the three basic roles into fine-grained permissions such as dashboards:read, dashboards:write, datasources:query, users:create, alert.rules:read. Permissions are bundled into roles: fixed roles ship with Grafana (like fixed:dashboards:reader), and custom roles are yours to define and assign to users, teams or the built-in roles. A role is a list of action and scope pairs, for example the action dashboards:read with the scope dashboards:uid:abc or folders:*. Roles can be provisioned from files in provisioning/access-control. Use RBAC when "Viewer, Editor or Admin" is too coarse, for example to allow a team to query one data source and nothing else.

Service accounts and API access

Automation should not log in as a person. A service account is a non-human identity with a basic role (or RBAC roles) and one or more tokens:

  1. Go to Administration > Users and access > Service accounts and create one with the least role that works (Viewer for read-only exporters, Editor for pipelines that push dashboards).
  2. Add a token with an expiry date and copy it once; it is shown only at creation time.
  3. Call the API with the header Authorization: Bearer <token>.

Service accounts replace the older "API keys". They can be disabled, have expiring tokens, and show up in audit logs. Never put a token in a dashboard or in Git; read it from a secret store.

Signing in

Grafana supports several authentication methods, configured in grafana.ini or the UI:

  • Built-in username and password (default).
  • LDAP / Active Directory: map directory groups to org roles and teams.
  • OAuth with providers such as GitHub, GitLab, Google, Azure AD / Entra ID, Okta or a generic OAuth provider. allowed_domains, role_attribute_path and group mapping control who enters and with which role.
  • SAML (Enterprise/Cloud).
  • Auth proxy: trust a header set by a reverse proxy that already authenticated the user.
  • JWT authentication for embedding or gateways.
  • Anonymous access: [auth.anonymous] enabled = true with an org_role (usually Viewer). It is useful for public wall displays, but think hard before exposing a Grafana to the internet that way.

Other practical security settings: set [security] admin_password (or GF_SECURITY_ADMIN_PASSWORD) and change the default admin password; use HTTPS ([server] protocol); set cookie_secure = true; disable user signup ([users] allow_sign_up = false); and restrict embedding with allow_embedding = false unless you need iframes.

Python Stand-in: map identity provider groups to org roles

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Good practice

  • Give permissions to teams, not people, so onboarding and offboarding are one membership change.
  • Start from least privilege: Viewer by default, edit rights only on the folders someone owns.
  • Keep data source permissions (Enterprise/Cloud) in mind: a dashboard viewer can see data the data source returns, so a restricted data source should be queried only through folders only the right team can open.
  • Turn on audit logs if your edition has them, and review who has Admin.
  • Rotate service account tokens and give them expiry dates.
flowchart TD
    U["User"] --> R["Org role<br/>Admin / Editor / Viewer"]
    U --> T["Team membership"]
    R --> F["Folder permissions<br/>View / Edit / Admin"]
    T --> F
    F --> D["Dashboards and nested folders<br/>inherit"]

A user's access comes from the highest of the role, team and personal entries.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What is an organization in Grafana?

    Orgs separate resources inside one server; users can belong to several.
  2. 2. A user is a Viewer in the org, and their team has Edit on a folder. What can they do in that folder?

    Effective permission is the highest level among the user's role, team and personal entries.
  3. 3. Why use a service account instead of a personal login for a CI pipeline?

    Service accounts isolate automation from people and use revocable, expiring tokens.
  4. 4. Which header carries a service account token?

    Use a bearer token in the Authorization header when calling the HTTP API.

Summary

  • Organizations separate resources; users have a basic role (Admin, Editor, Viewer, None) in each, plus an optional server admin flag.
  • Teams and folder permissions (View, Edit, Admin) give group-based, inherited access; the highest level applies.
  • RBAC adds fine-grained custom roles in Enterprise and Cloud editions.
  • Service accounts with expiring tokens are the way to automate; sign-in can use LDAP, OAuth, SAML, auth proxy or JWT.
  • Prefer least privilege, team-based grants and regular reviews.

Next: Dashboards as Code