You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/managed-grafana/how-to-permissions.md
+42-12Lines changed: 42 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,17 +4,18 @@ description: Learn how to manually set up permissions that allow your Azure Mana
4
4
author: maud-lv
5
5
ms.author: malev
6
6
ms.service: managed-grafana
7
+
ms.custom: engagement-fy23
7
8
ms.topic: how-to
8
-
ms.date: 6/10/2022
9
+
ms.date: 3/08/2022
9
10
---
10
11
11
12
# How to modify access permissions to Azure Monitor
12
13
13
14
By default, when a Grafana instance is created, Azure Managed Grafana grants it the Monitoring Reader role for all Azure Monitor data and Log Analytics resources within a subscription.
14
15
15
-
This means that the new Grafana instance can access and search all monitoring data in the subscription, including viewing the Azure Monitor metrics and logs from all resources, and any logs stored in Log Analytics workspaces in the subscription.
16
+
This means that the new Grafana instance can access and search all monitoring data in the subscription. It can view the Azure Monitor metrics and logs from all resources, and any logs stored in Log Analytics workspaces in the subscription.
16
17
17
-
In this article, you'll learn how to manually grant permission for Azure Managed Grafana to access an Azure resource using a managed identity.
18
+
In this article, learn how to manually grant permission for Azure Managed Grafana to access an Azure resource using a managed identity.
18
19
19
20
## Prerequisites
20
21
@@ -28,34 +29,63 @@ Sign in to the Azure portal at [https://portal.azure.com/](https://portal.azure.
28
29
29
30
## Edit Azure Monitor permissions
30
31
31
-
To change permissions for a specific resource, follow these steps:
32
+
To edit permissions for a specific resource, follow these steps.
33
+
34
+
### [Portal](#tab/azure-portal)
32
35
33
36
1. Open a resource that contains the monitoring data you want to retrieve. In this example, we're configuring an Application Insights resource.
34
37
1. Select **Access Control (IAM)**.
35
38
1. Under **Grant access to this resource**, select **Add role assignment**.
36
39
37
40
:::image type="content" source="./media/permissions/permissions-iam.png" alt-text="Screenshot of the Azure platform to add role assignment in App Insights.":::
38
41
39
-
1. The portal lists various roles you can give to your Managed Grafana resource. Select a role. For instance, **Monitoring Reader**. Select this role.
40
-
1. Click **Next**.
42
+
1. The portal lists all the roles you can give to your Azure Managed Grafana resource. Select a role. For instance, **Monitoring Reader**, and select **Next**.
41
43
:::image type="content" source="./media/permissions/permissions-role.png" alt-text="Screenshot of the Azure platform and choose Monitor Reader.":::
42
44
43
-
1. For **Assign access to**, select **Managed Identity**.
44
-
1. Click **Select members**.
45
+
1. For **Assign access to**, select **Managed identity**.
46
+
1. Click on **Select members**.
45
47
46
48
:::image type="content" source="media/permissions/permissions-members.png" alt-text="Screenshot of the Azure platform selecting members.":::
47
49
48
-
1. Select the **Subscription** containing your Managed Grafana instance
49
-
1.Select a **Managed identity** from the options in the dropdown list
50
-
1. Select the Managed Grafana instance from the list.
50
+
1. Select the **Subscription** containing your Managed Grafana instance.
1. Select one or several Managed Grafana instances.
51
53
1. Click **Select** to confirm
52
54
53
55
:::image type="content" source="media/permissions/permissions-managed-identities.png" alt-text="Screenshot of the Azure platform selecting the instance.":::
54
56
55
-
1.Click**Next**, then **Review + assign** to confirm the application of the new permission
57
+
1.Select**Next**, then **Review + assign** to confirm the assignment of the new permission.
56
58
57
59
For more information about how to use Managed Grafana with Azure Monitor, go to [Monitor your Azure services in Grafana](../azure-monitor/visualize/grafana-plugin.md).
58
60
61
+
### [Azure CLI](#tab/azure-cli)
62
+
63
+
Assign a role assignment using the [az role assignment create](/cli/azure/role/assignment#az-role-assignment-create) command.
64
+
65
+
In the code below, replace the following placeholders:
66
+
67
+
-`<assignee>`: enter the assignee's object ID. For a managed identity, enter the managed identity's ID.
68
+
-`<roleNameOrId>`: enter the role's name or ID. For Monitoring Reader, enter `Monitoring Reader` or `43d0d8ad-25c7-4714-9337-8ba259a9fe05`.
69
+
-`<scope>`: enter the full ID of the resource Azure Managed Grafana needs access to.
70
+
71
+
```azurecli
72
+
az role assignment create --assignee "<assignee>" \
73
+
--role "<roleNameOrId>" \
74
+
--scope "<scope>"
75
+
```
76
+
77
+
Example: assigning permission for an Azure Managed Grafana instance to access an Application Insights resource using a managed identity.
78
+
79
+
```azurecli
80
+
az role assignment create --assignee "/subscriptions/abcdef01-2345-6789-0abc-def012345678/resourcegroups/my-rg/providers/Microsoft.Dashboard/grafana/mygrafanaworkspace" \
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).
title: How to share an Azure Managed Grafana instance
3
-
description: 'Azure Managed Grafana: learn how you can share access permissions and dashboards with your team and customers.'
3
+
description: 'Learn how you can share access permissions to Azure Grafana Managed.'
4
4
author: maud-lv
5
5
ms.author: malev
6
6
ms.service: managed-grafana
7
+
ms.custom: engagement-fy23
7
8
ms.topic: how-to
8
-
ms.date: 3/31/2022
9
+
ms.date: 3/08/2023
9
10
---
10
11
11
-
# How to share an Azure Managed Grafana instance
12
+
# How to share access to Azure Managed Grafana
12
13
13
-
A DevOps team may build dashboards to monitor and diagnose an application or infrastructure that it manages. Likewise, a support team may use a Grafana monitoring solution for troubleshooting customer issues. In these scenarios, multiple users will be accessing one Grafana instance. Azure Managed Grafana enables such sharing by allowing you to set the custom permissions on an instance that you own. This article explains what permissions are supported and how to grant permissions to share dashboards with your internal teams or external customers.
14
+
A DevOps team may build dashboards to monitor and diagnose an application or infrastructure that it manages. Likewise, a support team may use a Grafana monitoring solution for troubleshooting customer issues. In these scenarios, multiple users are accessing one Grafana instance.
15
+
16
+
Azure Managed Grafana enables such collaboration by allowing you to set custom permissions on an instance that you own. This article explains what permissions are supported and how to grant permissions to share an Azure Managed Grafana instance with your stakeholders.
14
17
15
18
## Prerequisites
16
19
17
20
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free).
18
21
- An Azure Managed Grafana instance. If you don't have one yet, [create a Managed Grafana instance](./how-to-permissions.md).
22
+
- You must have Grafana Admin permissions on the instance.
19
23
20
24
## Supported Grafana roles
21
25
22
-
Azure Managed Grafana supports the Admin, Viewer and Editor roles:
26
+
Azure Managed Grafana supports the Grafana Admin, Grafana Editor, and Grafana Viewer roles:
23
27
24
-
- The Admin role provides full control of the instance including viewing, editing, and configuring data sources.
25
-
- The Editor role provides read-write access to the dashboards in the instance.
26
-
- The Viewer role provides read-only access to dashboards in the instance.
28
+
- The Grafana Admin role provides full control of the instance including managing role assignments, viewing, editing, and configuring data sources.
29
+
- The Grafana Editor role provides read-write access to the dashboards in the instance.
30
+
- The Grafana Viewer role provides read-only access to dashboards in the instance.
27
31
28
-
The Admin role is automatically assigned to the creator of a Grafana instance. More details on Admin, Editor, and Viewer roles can be found at [Grafana organization roles](https://grafana.com/docs/grafana/latest/permissions/organization_roles/#compare-roles).
32
+
More details on Grafana roles can be found in the [Grafana documentation](https://grafana.com/docs/grafana/latest/permissions/organization_roles/#compare-roles).
29
33
30
-
Grafana user roles and assignments are fully integrated with the Azure Active Directory (Azure AD). You can add any Azure AD user or security group to a Grafana role 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 users to the Viewer or Editor role in the Azure portal.
34
+
Grafana user roles and assignments are fully [integrated within Azure Active Directory (Azure AD)](../role-based-access-control/built-in-roles.md#grafana-admin). You can assign a Grafana role to any Azure AD 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.
31
35
32
36
> [!NOTE]
33
-
> Azure Managed Grafana doesn't support personal [Microsoft accounts](https://account.microsoft.com) (a.k.a., MSA) currently.
34
-
35
-
## Sign in to Azure
37
+
> Azure Managed Grafana doesn't support personal Microsoft accounts (MSA) currently.
36
38
37
-
Sign in to the Azure portal at [https://portal.azure.com/](https://portal.azure.com/) with your Azure account.
39
+
## Add a Grafana role assignment
38
40
39
-
##Assign an Admin, Viewer or Editor role to a user
41
+
### [Portal](#tab/azure-portal)
40
42
41
-
1. Open your Managed Grafana instance.
42
-
1. Select **Access control (IAM)** in the navigation menu.
43
-
1.Click**Add**, then **Add role assignment**
43
+
1. Open your Azure Managed Grafana instance.
44
+
1. Select **Access control (IAM)** in the left menu.
45
+
1.Select**Addrole assignment**.
44
46
45
47
:::image type="content" source="media/share/iam-page.png" alt-text="Screenshot of Add role assignment in the Azure platform.":::
46
48
47
-
1. Select one of the Grafana roles to assign to a user or security group. The available roles are:
48
-
49
-
- Grafana Admin
50
-
- Grafana Editor
51
-
- Grafana Viewer
49
+
1. Select a Grafana role to assign among **Grafana Admin**, **Grafana Editor** or **Grafana Viewer**, then select **Next**.
52
50
53
51
:::image type="content" source="media/share/role-assignment.png" alt-text="Screenshot of the Grafana roles in the Azure platform.":::
54
52
53
+
1. Choose if you want to assign access to a **User, group, or service principal**, or to a **Managed identity**.
54
+
1. Click on **Select members**, pick the members you want to assign to the Grafana role and then confirm with **Select**.
55
+
1. Select **Next**, then **Review + assign** to complete the role assignment.
56
+
55
57
> [!NOTE]
56
-
> Dashboard and data source level sharing will be done from within the Grafana application. For more details, refer to [Grafana permissions](https://grafana.com/docs/grafana/latest/permissions/).
58
+
> Dashboard and data source level sharing are done from within the Grafana application. For more information, refer to [Share a Grafana dashboard or panel](./how-to-share-dashboard.md). [Share a Grafana dashboard] and [Data source permissions](https://grafana.com/docs/grafana/latest/administration/data-source-management/#data-source-permissions).
59
+
60
+
### [Azure CLI](#tab/azure-cli)
61
+
62
+
Assign a role using the [az role assignment create](/cli/azure/role/assignment#az-role-assignment-create) command.
63
+
64
+
In the code below, replace the following placeholders:
65
+
66
+
-`<assignee>`:
67
+
- For an Azure AD user, enter their email address or the user object ID.
68
+
- For a group, enter the group object ID.
69
+
- For a service principal, enter the service principal object ID.
70
+
- For a managed identity, enter the object ID.
71
+
-`<roleNameOrId>`:
72
+
- For Grafana Admin, enter `Grafana Admin` or `22926164-76b3-42b3-bc55-97df8dab3e41`.
73
+
- For Grafana Editor, enter `Grafana Editor` or `a79a5197-3a5c-4973-a920-486035ffd60f`.
74
+
- For Grafana Viewer, enter `Grafana Viewer` or `60921a7e-fef1-4a43-9b16-a26c52ad4769`.
75
+
-`<scope>`: enter the full ID of the Azure Managed Grafana instance.
76
+
77
+
```azurecli
78
+
az role assignment create --assignee "<assignee>" \
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).
91
+
92
+
---
57
93
58
94
## Next steps
59
95
@@ -64,4 +100,4 @@ Sign in to the Azure portal at [https://portal.azure.com/](https://portal.azure.
64
100
> [Modify access permissions to Azure Monitor](./how-to-permissions.md)
65
101
66
102
> [!div class="nextstepaction"]
67
-
> [Call Grafana APIs in your automation](./how-to-api-calls.md)
103
+
> [Share a Grafana dashboard or panel](./how-to-share-dashboard.md).
0 commit comments