Skip to content

Commit 1570439

Browse files
authored
Merge pull request #229958 from maud-lv/ml-g-shareinstance
Edit instance access sharing and permissions docs
2 parents b74ab03 + dc03f55 commit 1570439

File tree

5 files changed

+105
-39
lines changed

5 files changed

+105
-39
lines changed

articles/managed-grafana/how-to-permissions.md

Lines changed: 42 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,18 @@ description: Learn how to manually set up permissions that allow your Azure Mana
44
author: maud-lv
55
ms.author: malev
66
ms.service: managed-grafana
7+
ms.custom: engagement-fy23
78
ms.topic: how-to
8-
ms.date: 6/10/2022
9+
ms.date: 3/08/2022
910
---
1011

1112
# How to modify access permissions to Azure Monitor
1213

1314
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.
1415

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.
1617

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.
1819

1920
## Prerequisites
2021

@@ -28,34 +29,63 @@ Sign in to the Azure portal at [https://portal.azure.com/](https://portal.azure.
2829

2930
## Edit Azure Monitor permissions
3031

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)
3235

3336
1. Open a resource that contains the monitoring data you want to retrieve. In this example, we're configuring an Application Insights resource.
3437
1. Select **Access Control (IAM)**.
3538
1. Under **Grant access to this resource**, select **Add role assignment**.
3639

3740
:::image type="content" source="./media/permissions/permissions-iam.png" alt-text="Screenshot of the Azure platform to add role assignment in App Insights.":::
3841

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**.
4143
:::image type="content" source="./media/permissions/permissions-role.png" alt-text="Screenshot of the Azure platform and choose Monitor Reader.":::
4244

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**.
4547

4648
:::image type="content" source="media/permissions/permissions-members.png" alt-text="Screenshot of the Azure platform selecting members.":::
4749

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.
51+
1. For **Managed identity**, select **Azure Managed Grafana**.
52+
1. Select one or several Managed Grafana instances.
5153
1. Click **Select** to confirm
5254

5355
:::image type="content" source="media/permissions/permissions-managed-identities.png" alt-text="Screenshot of the Azure platform selecting the instance.":::
5456

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.
5658

5759
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).
5860

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" \
81+
--role "Monitoring Reader" \
82+
--scope "/subscriptions/abcdef01-2345-6789-0abc-def012345678/resourcegroups/my-rg/providers/microsoft.insights/components/myappinsights/
83+
```
84+
85+
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).
86+
87+
---
88+
5989
## Next steps
6090

6191
> [!div class="nextstepaction"]
Lines changed: 61 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,95 @@
11
---
22
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.'
44
author: maud-lv
55
ms.author: malev
66
ms.service: managed-grafana
7+
ms.custom: engagement-fy23
78
ms.topic: how-to
8-
ms.date: 3/31/2022
9+
ms.date: 3/08/2023
910
---
1011

11-
# How to share an Azure Managed Grafana instance
12+
# How to share access to Azure Managed Grafana
1213

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.
1417

1518
## Prerequisites
1619

1720
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free).
1821
- 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.
1923

2024
## Supported Grafana roles
2125

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:
2327

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.
2731

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).
2933

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.
3135

3236
> [!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.
3638
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
3840

39-
## Assign an Admin, Viewer or Editor role to a user
41+
### [Portal](#tab/azure-portal)
4042

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 **Add role assignment**.
4446

4547
:::image type="content" source="media/share/iam-page.png" alt-text="Screenshot of Add role assignment in the Azure platform.":::
4648

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**.
5250

5351
:::image type="content" source="media/share/role-assignment.png" alt-text="Screenshot of the Grafana roles in the Azure platform.":::
5452

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+
5557
> [!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>" \
79+
--role "<roleNameOrId>" \
80+
--scope "<scope>"
81+
```
82+
83+
Example:
84+
85+
```azurecli
86+
az role assignment create --assignee "[email protected]" \
87+
--role "Grafana Admin" \
88+
--scope "/subscriptions/abcdef01-2345-6789-0abc-def012345678/resourcegroups/my-rg/providers/Microsoft.Dashboard/grafana/my-grafana"
89+
```
90+
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+
---
5793

5894
## Next steps
5995

@@ -64,4 +100,4 @@ Sign in to the Azure portal at [https://portal.azure.com/](https://portal.azure.
64100
> [Modify access permissions to Azure Monitor](./how-to-permissions.md)
65101
66102
> [!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).

articles/managed-grafana/index.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ landingContent:
5151
linkLists:
5252
- linkListType: how-to-guide
5353
links:
54-
- text: Modify permissions
54+
- text: Modify access to Azure Monitor
5555
url: how-to-permissions.md
5656
- text: Share an instance
5757
url: how-to-share-grafana-workspace.md
-21.2 KB
Loading

articles/managed-grafana/toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ items:
3939
href: how-to-create-dashboard.md
4040
- name: Share a dashboard
4141
href: how-to-share-dashboard.md
42-
- name: Share an Azure Managed Grafana instance
42+
- name: Share a workspace
4343
href: how-to-share-grafana-workspace.md
4444
- name: Configure SMTP settings
4545
href: how-to-smtp-settings.md

0 commit comments

Comments
 (0)