|
| 1 | +--- |
| 2 | +title: Manage access and permissions for users and identities |
| 3 | +titleSuffix: Azure Managed Grafana |
| 4 | +description: Learn how you can manage access permissions to Azure Managed Grafana by assigning a Grafana role to a user, group, service principal, or a managed identity. |
| 5 | +#customer intent: As a Grafana administrator, I want to learn how to assign team members and identities relevant Grafana roles and leverage folder and dashboard permission settings, so that I can control and restrict access to Grafana. |
| 6 | +author: maud-lv |
| 7 | +ms.author: malev |
| 8 | +ms.service: azure-managed-grafana |
| 9 | +ms.custom: engagement-fy23 |
| 10 | +ms.topic: how-to |
| 11 | +ms.date: 01/15/2025 |
| 12 | +--- |
| 13 | + |
| 14 | +# Manage access and permissions for users and identities |
| 15 | + |
| 16 | +In today's collaborative work environments, multiple teams often need to access and manage the same monitoring dashboards. Whether it's a DevOps team monitoring application performance or a support team troubleshooting customer issues, having the right access permissions is crucial. Azure Managed Grafana simplifies this process by allowing you to set varying levels of permissions for your team members and identities. |
| 17 | + |
| 18 | +This guide walks you through the supported Grafana roles and shows you how to use roles and permission settings to share the relevant access permissions with your team members and identities. |
| 19 | + |
| 20 | + |
| 21 | +## Prerequisites |
| 22 | + |
| 23 | +- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free). |
| 24 | +- An Azure Managed Grafana instance. If you don't have one yet, [create a Managed Grafana instance](./how-to-permissions.md). |
| 25 | +- You must have Grafana Admin permissions on the instance. |
| 26 | + |
| 27 | +## Learn about Grafana roles |
| 28 | + |
| 29 | +Azure Managed Grafana supports [Azure role-based access control (RBAC)](../role-based-access-control/index.yml), an authorization system that lets you manage individual access to your Azure resources. |
| 30 | + |
| 31 | +Azure RBAC enables you to allocate varying permission levels to users, groups, service principals, or managed identities, for managing your Azure Managed Grafana resources. |
| 32 | + |
| 33 | +The following built-in roles are available in Azure Managed Grafana, each providing different levels of access: |
| 34 | + |
| 35 | +> [!div class="mx-tableFixed"] |
| 36 | +> | Built-in role | Description | ID | |
| 37 | +> | --- | --- | --- | |
| 38 | +> | <a name='grafana-admin'></a>[Grafana Admin](../role-based-access-control/built-in-roles/monitor.md#grafana-admin) | Perform all Grafana operations, including the ability to manage data sources, create dashboards, and manage role assignments within Grafana. | 22926164-76b3-42b3-bc55-97df8dab3e41 | |
| 39 | +> | <a name='grafana-editor'></a>[Grafana Editor](../role-based-access-control/built-in-roles/monitor.md#grafana-editor) | View and edit a Grafana instance, including its dashboards and alerts. | a79a5197-3a5c-4973-a920-486035ffd60f | |
| 40 | +> | <a name='grafana-limited-viewer'></a>[Grafana Limited Viewer](../role-based-access-control/built-in-roles/monitor.md#grafana-limited-viewer) | View a Grafana home page. This role contains no permissions assigned by default and it is not available for Grafana v9 workspaces. | 41e04612-9dac-4699-a02b-c82ff2cc3fb5 | |
| 41 | +> | <a name='grafana-viewer'></a>[Grafana Viewer](../role-based-access-control/built-in-roles/monitor.md#grafana-viewer) | View a Grafana instance, including its dashboards and alerts. | 60921a7e-fef1-4a43-9b16-a26c52ad4769 | |
| 42 | +
|
| 43 | +To access the Grafana user interface, users must possess one of the roles above. You can find more information about the Grafana roles from the [Grafana documentation](https://grafana.com/docs/grafana/latest/administration/roles-and-permissions/#organization-roles). The Grafana Limited Viewer role in Azure maps to the "No Basic Role" in the Grafana docs. |
| 44 | + |
| 45 | +## Assign a Grafana role |
| 46 | + |
| 47 | +Grafana user roles and assignments are fully [integrated within Microsoft Entra ID](../role-based-access-control/built-in-roles.md#grafana-admin). You can assign a Grafana role to any Microsoft Entra user, group, service principal, or managed identity, and grant them access permissions associated with that role. You can manage these permissions from the Azure portal or the command line. This section explains how to assign Grafana roles to users in the Azure portal. |
| 48 | + |
| 49 | +### [Portal](#tab/azure-portal) |
| 50 | + |
| 51 | +1. Open your Azure Managed Grafana instance. |
| 52 | +1. Select **Access control (IAM)** in the left menu. |
| 53 | +1. Select **Add role assignment**. |
| 54 | + |
| 55 | + :::image type="content" source="media/share/iam-page.png" alt-text="Screenshot of Add role assignment in the Azure platform."::: |
| 56 | + |
| 57 | +1. Select a Grafana role to assign among **Grafana Admin**, **Grafana Editor**, **Grafana Limited Viewer**, or **Grafana Viewer**, then select **Next**. |
| 58 | + |
| 59 | + :::image type="content" source="media/share/role-assignment.png" alt-text="Screenshot of the Grafana roles in the Azure platform."::: |
| 60 | + |
| 61 | +1. Choose if you want to assign access to a **User, group, or service principal**, or to a **Managed identity**. |
| 62 | +1. Click on **Select members**, pick the members you want to assign to the Grafana role and then confirm with **Select**. |
| 63 | +1. Select **Next**, then **Review + assign** to complete the role assignment. |
| 64 | + |
| 65 | +### [Azure CLI](#tab/azure-cli) |
| 66 | + |
| 67 | +Assign a role using the [az role assignment create](/cli/azure/role/assignment#az-role-assignment-create) command. |
| 68 | + |
| 69 | +In the code below, replace the following placeholders: |
| 70 | + |
| 71 | +- `<assignee>`: |
| 72 | + - For a Microsoft Entra user, enter their email address or the user object ID. |
| 73 | + - For a group, enter the group object ID. |
| 74 | + - For a service principal, enter the service principal object ID. |
| 75 | + - For a managed identity, enter the object ID. |
| 76 | +- `<roleNameOrId>`: |
| 77 | + - For Grafana Admin, enter `Grafana Admin` or `22926164-76b3-42b3-bc55-97df8dab3e41`. |
| 78 | + - For Grafana Editor, enter `Grafana Editor` or `a79a5197-3a5c-4973-a920-486035ffd60f`. |
| 79 | + - For Grafana Limited Viewer, enter `Grafana Limited Viewer` or `41e04612-9dac-4699-a02b-c82ff2cc3fb5`. |
| 80 | + - For Grafana Viewer, enter `Grafana Viewer` or `60921a7e-fef1-4a43-9b16-a26c52ad4769`. |
| 81 | +- `<scope>`: enter the full ID of the Azure Managed Grafana instance. |
| 82 | + |
| 83 | +```azurecli |
| 84 | +az role assignment create --assignee "<assignee>" \ |
| 85 | +--role "<roleNameOrId>" \ |
| 86 | +--scope "<scope>" |
| 87 | +``` |
| 88 | + |
| 89 | +Example: |
| 90 | + |
| 91 | +```azurecli |
| 92 | +az role assignment create --assignee "[email protected]" \ |
| 93 | +--role "Grafana Admin" \ |
| 94 | +--scope "/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourcegroups/my-rg/providers/Microsoft.Dashboard/grafana/my-grafana" |
| 95 | +``` |
| 96 | +For more information about assigning Azure roles using the Azure CLI, refer to the [Role based access control documentation](../role-based-access-control/role-assignments-cli.md). |
| 97 | + |
| 98 | +--- |
| 99 | + |
| 100 | +> [!TIP] |
| 101 | +> When onboarding a new user to your instance of Azure Managed Grafana, granting them the Grafana Limited Viewer role allows them limited access to the Grafana instance. |
| 102 | +> |
| 103 | +> You can then grant the user access to each relevant dashboard and data source using their management settings. This method ensures that users with the Grafana Limited Viewer role only access the specific components they need, enhancing security and data privacy. |
| 104 | +
|
| 105 | +## Edit permissions for specific component elements |
| 106 | + |
| 107 | +Edit permissions for specific components such as dashboards, folders, and data sources from the Grafana user interface following these steps: |
| 108 | + |
| 109 | +1. Open the Grafana portal and navigate to the component for which you want to manage permissions. |
| 110 | +1. Go to **Settings** > **Permissions** > **Add a permission**. |
| 111 | +1. Under **Add permission for**, select a user, service account, team, or role, and assign them the desired permission level: view, edit, or admin. |
| 112 | + |
| 113 | +## Related content |
| 114 | + |
| 115 | +- [Share a Grafana dashboard or panel](./how-to-share-dashboard.md). |
| 116 | +- [Configure data sources](./how-to-data-source-plugins-managed-identity.md) |
| 117 | +- [Configure Grafana teams](how-to-sync-teams-with-entra-groups.md) |
0 commit comments