This is documentation for the next version of Grafana. For the latest stable release, go to the latest version.
Manage access using roles
In Grafana Enterprise and Grafana Cloud, there are Basic, Fixed, and Custom roles.
Basic roles
There are four basic roles: Admin, Editor, Viewer, and No basic role. Each basic role contains a number of fixed roles.
The No basic role allows you to further customize access by assigning fixed roles to users, which you can also modify. You can also create and assign custom roles to a user with No basic role.
Details of the basic roles and the access they provide for Grafana Alerting are below.
Fixed roles
A fixed role is a group of multiple permissions.
Fixed roles provide users more granular access to create, view, and update Alerting resources than you would have with basic roles alone.
Details of the fixed roles and the access they provide for Grafana Alerting are below.
Create custom roles
Create custom roles of your own to manage permissions. Custom roles contain unique combinations of permissions, actions and scopes. Create a custom role when basic roles and fixed roles do not meet your permissions requirements.
For more information on creating custom roles, refer to Create custom roles.
Note
It is not recommended to create custom roles that include
alerting.notifications.receiver
actions with a scope other thanreceivers:*
. The UID used in the scope is not stable and changes whenever a contact point is renamed.
Examples
The following examples give you an idea of how you can combine permissions for Grafana Alerting.
A custom role for read access to alert rules in folder F:
PUT access-control/roles
{
"name": "custom:alert_rules_reader",
"displayName": "Alert rule reader in folder F",
"description": "Read access to rules in folder F that use DS1 and DS2",
"permissions": [
{
"action": "alert.rules:read",
"scope": "folders:uid:UID_F"
},
{
"action": "folders:read",
"scope": "folders:uid:UID_F"
}
]
}
A custom role for write access to alert rules that uses simplified routing:
PUT access-control/roles
{
"name": "custom:alert_rules_updater",
"displayName": "Alert rules editor in folder F",
"description": "Edit access to rules in folder F that use DS1 and DS2",
"permissions": [
{
"action": "alert.rules:read",
"scope": "folders:uid:UID_F"
},
{
"action": "alert.rules:read",
"scope": "folders:uid:UID_F"
},
{
"action": "alert.rules:write",
"scope": "folders:uid:UID_F"
},
{
"action": "alert.rules:create",
"scope": "folders:uid:UID_F"
},
{
"action": "alert.notifications.receivers:list",
},
{
"action": "alert.notifications.time-intervals:read",
},
]
}
Note
Delete the last two permissions if you aren’t using simplified notification routing.
Assign roles
To assign roles, complete the following steps.
- Navigate to Administration > Users and access > Users, Teams, or Service Accounts.
- Search for the user, team or service account you want to add a role for.
- Select the role you want to assign.