docs/sources/tutorials/create-users-and-teams/index.md
This tutorial is for admins or anyone that wants to learn how to manage users in Grafana. You'll add multiple local users, organize them into teams, and make sure they're only able to access the resources they need.
Graphona, a fictional telemarketing company, has asked you to configure Grafana for their teams.
In this scenario, you'll:
{{% class "prerequisite-section" %}}
In Grafana, all users are granted an organization role that determines what resources they can access.
There are three types of organization roles in Grafana. The Grafana Admin is
a global role, the default admin user has this role.
{{< admonition type="note" >}} You can also configure Grafana to allow anonymous access, to make dashboards available even to those who don't have a Grafana user account. That's how Grafana Labs made https://play.grafana.org publicly available. {{< /admonition >}}
Graphona has asked you to add a group of early adopters that work in the Marketing and Engineering teams. They'll need to be able to edit their own team's dashboards, but want to have view access to dashboards that belong to the other team.
| Name | Username | |
|---|---|---|
| Almaz Russom | [email protected] | almaz.russom |
| Brenda Tilman | [email protected] | brenda.tilman |
| Mada Rawdha Tahan | [email protected] | mada.rawdha.tahan |
| Yuan Yang | [email protected] | yuan.yang |
Repeat the following steps for each of the employees in the table above to create the new user accounts:
When you create a user they are granted the Viewer role by default, which means that they won't be able to make any changes to any of the resources in Grafana. That's ok for now, you'll grant more user permissions by adding users to teams in the next step.
Teams let you grant permissions to a group of users, instead of granting permissions to individual users one at a time.
Teams are useful when onboarding new colleagues. When you add a user to a team, they get access to all resources assigned to that team.
In this step, you'll create two teams and assign users to them.
| Username | Team |
|---|---|
| brenda.tilman | Marketing |
| mada.rawdha.tahan | Marketing |
| almaz.russom | Engineering |
| yuan.yang | Engineering |
Create the Marketing and Engineering teams.
Repeat these steps for each user to assign them to their team. Refer to the table above for team assignments.
When you're done, you'll have two teams with two users assigned to each.
It's a good practice to use folders to organize collections of related dashboards. You can assign permissions at the folder level to individual users or teams.
The Marketing team is going to use Grafana for analytics, while the Engineering team wants to monitor the application they're building.
You'll create two folders, Analytics and Application, where each team can add their own dashboards. The teams still want to be able to view each other's dashboards.
| Folder | Team | Permissions |
|---|---|---|
| Analytics | Marketing | Edit |
| Engineering | View | |
| Application | Marketing | View |
| Engineering | Edit |
Repeat the following steps for each folder. You'll move through all three steps for each folder before moving on to the next one.
By default, when you create a folder, all users with the Viewer role are granted permission to view the folder.
In this example, Graphona wants to explicitly grant teams access to folders. To support this, you need to remove the Viewer role from the list of permissions:
When you're finished, you'll have two empty folders, the contents of which can only be viewed by members of the Marketing or Engineering teams. Only Marketing team members can edit the contents of the Analytics folder, only Engineering team members can edit the contents of the Application folder.
By using folders and teams, you avoid having to manage permissions for individual users.
However, there are times when you need to configure permissions on a more granular level. For these cases, Grafana allows you to override permissions for specific dashboards.
Graphona has hired a consultant to assist the Marketing team. The consultant should only be able to access the SEO dashboard in the Analytics folder.
| Name | Username | |
|---|---|---|
| Luc Masson | [email protected] | luc.masson |
You've created a new user and given them unique permissions to view a single dashboard within a folder.
You can repeat these steps to log in as the other users you've created see the differences in the viewer and editor roles.
For this example, you can log in as the user luc.masson to see that they can only access the SEO dashboard.
luc.masson as the username.In this tutorial, you've configured Grafana for an organization: