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-sync-teams-with-azure-ad-groups.md
+49-25Lines changed: 49 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,28 @@
1
1
---
2
2
title: Create Grafana teams with Microsoft Entra groups
3
-
description: Learn how to set up Grafana teams using Microsoft Entra groups in Azure Managed Grafana
3
+
description: Learn how to set up Grafana teams and allow access to Grafana folders and dashboards using Microsoft Entra groups in Azure Managed Grafana.
4
+
#customer intent: As a Grafana administrator, I want to set up a Grafana team using Microsoft Entra groups to allow access to specific folders and dashboards.
4
5
ms.service: managed-grafana
5
6
ms.topic: how-to
6
7
author: maud-lv
7
8
ms.author: malev
8
9
ms.date: 06/7/2024
9
10
---
10
11
11
-
# Create Grafana teams with Microsoft Entra groups
12
+
# Create and manage Grafana teams with Microsoft Entra groups
12
13
13
-
In this guide, you learn how to use Microsoft Entra groups with [Grafana Team Sync](https://grafana.com/docs/grafana/latest/setup-grafana/configure-security/configure-team-sync/) (Microsoft Entra group sync) to set dashboard permissions in Azure Managed Grafana. Grafana allows you to control access to its resources at multiple levels. In Managed Grafana, you use the built-in Azure RBAC roles for Grafana to define access rights users have. These permissions are applied to all resources in your Grafana workspace by default. You can't, for example, grant someone edit permission to only one particular dashboard with RBAC. If you assign a user to the Grafana Editor role, that user can make changes to any dashboard in your Grafana workspace. Using Grafana's [granular permission model](https://grafana.com/docs/grafana/latest/setup-grafana/configure-security/configure-team-sync/), you can elevate or demote a user's default permission level for specific dashboards (or dashboard folders).
14
+
In this guide, you learn how to use Microsoft Entra groups with [Grafana Team Sync](https://grafana.com/docs/grafana/latest/setup-grafana/configure-security/configure-team-sync/) to set dashboard permissions in Azure Managed Grafana.
14
15
15
-
Setting up dashboard permissions for individual users in Managed Grafana is a little tricky. Managed Grafana stores the user assignments for its built-in RBAC roles in Microsoft Entra ID. For performance reasons, it doesn't automatically synchronize the user assignments to Grafana workspaces. Users in these roles don't show up in Grafana's **Configuration** UI until they've signed in once. You can only grant users extra permissions after they appear in the Grafana user list in **Configuration**. Microsoft Entra group sync gets around this issue. With this feature, you create a *Grafana team* in your Grafana workspace linked with a Microsoft Entra group. You then use that team in configuring your dashboard permissions. For example, you can grant a viewer the ability to modify a dashboard or block an editor from being able to make changes. You don't need to manage the team's member list separately since its membership is already defined in the associated Microsoft Entra group.
16
+
Grafana allows you to control access to its resources at multiple levels. In Azure Managed Grafana, you use the built-in Azure role-based access control(RBAC) roles for Grafana to define access rights users have. These permissions are applied to all resources in your Grafana workspace by default. You can't, for example, grant someone edit permission to only one particular dashboard with RBAC. If you assign a user to the Grafana Editor role, that user can make changes to any dashboard in your Grafana workspace. Using Grafana's [granular permission model](https://grafana.com/docs/grafana/latest/setup-grafana/configure-security/configure-team-sync/), you can elevate or demote a user's default permission level for specific dashboards, or dashboard folders.
17
+
18
+
Managed Grafana stores the user assignments for its built-in RBAC roles in Microsoft Entra ID. For performance reasons, it doesn't automatically synchronize the user assignments to Grafana workspaces. Users in these roles don't show up in Grafana's **Configuration** UI until they've signed in once. You can only grant users extra permissions after they appear in the Grafana user list in **Configuration**. Microsoft Entra group sync gets around this issue. With this feature, you create a *Grafana team* in your Grafana workspace linked with a Microsoft Entra group. You then configure your dashboard permissions for that team. For example, you can grant a Grafana viewer the ability to modify a dashboard, or block a Grafana editor from being able to make changes.
19
+
20
+
Setting up Microsoft Entra group sync is done by following these steps in a given Azure Managed Grafana workspace:
21
+
22
+
1. Assign a Grafana role to a Microsoft Entra Group
23
+
1. Create a Grafana team in an Azure Managed Grafana workspace
24
+
1. Assign the Microsoft Entra group in the Grafana team
25
+
1. In the Grafana UI, assign permissions at the folder or dashboard level
16
26
17
27
<a name='set-up-azure-ad-group-sync'></a>
18
28
@@ -22,26 +32,25 @@ To follow the steps in this guide, you must have:
22
32
23
33
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free).
24
34
- An Azure Managed Grafana instance. If needed, [create a new instance](quickstart-managed-grafana-portal.md).
25
-
- A Microsoft Entra group. I needed, [create a basic group and add members](/entra/fundamentals/how-to-manage-groups#create-a-basic-group-and-add-members).
35
+
- A Microsoft Entra group. If needed, [create a basic group and add members](/entra/fundamentals/how-to-manage-groups.md#create-a-basic-group-and-add-members).
26
36
27
-
## Set up Microsoft Entra group sync
37
+
## Give the Microsoft Entra group the required permission on the Grafana instance
28
38
29
-
To use Microsoft Entra group sync, you assign a Grafana role to a Microsoft Entra Group, create a Grafana team, and link this Microsoft Entra group to this
39
+
The Microsoft Entra group must have a Grafana role to access the Grafana instance.
30
40
31
-
group to add a team to your Grafana workspace, and link this team to an existing Microsoft Entra group through its group ID.
41
+
1. In your Grafana workspace, open the **Access control (IAM)** menu select **Add** > **Add new role assignment**.
32
42
33
-
## Give this groupthe desired permission on the Grafana instance.
43
+
:::image type="content" source="media/azure-ad-group-sync/add-role-assignment.png" alt-text="Screenshot of the Azure portal. Adding a new role assignment.":::
34
44
35
-
The Microsoft Entra group must have a Grafana role to access the Grafana instance.
45
+
1. Assign a role, such as **Grafana viewer**, to the Microsoft Entra group.
36
46
37
-
1. In your Grafana workspace, open the **Access control (IAM)** menu select **Add** > **Add new role assignment**.
38
-
1. Assign a role, such as **Grafana viewer**, to the Microsoft Entra group
47
+
For more information about assigning a role, go to [Grant access](../role-based-access-control/quickstart-assign-role-user-portal.md#grant-access).
39
48
40
49
### Create a Grafana team
41
50
42
-
Follow these steps to set up a Microsoft Entra ID-backed Grafana team.
51
+
Set up a Microsoft Entra ID-backed Grafana team.
43
52
44
-
1. In the Azure portal, open your Grafana instance and select **Configuration** under *Settings*.
53
+
1. In the Azure portal, open your Grafana instance and select **Configuration** under **Settings**.
45
54
1. Select the **Microsoft Entra Team Sync Settings** tab.
46
55
1. Select **Create new Grafana team**.
47
56
@@ -60,21 +69,36 @@ Follow these steps to set up a Microsoft Entra ID-backed Grafana team.
60
69
61
70
:::image type="content" source="media/azure-ad-group-sync/select-azure-ad-group.png" alt-text="Screenshot of the Azure portal. Finding and selecting a Microsoft Entra group.":::
62
71
63
-
1. Repeat the previous three steps to add more Microsoft Entra groups to the Grafana team as appropriate.
72
+
1. Optionally repeat the previous three steps to add more Microsoft Entra groups to the Grafana team as appropriate.
73
+
74
+
### Assign access to a Grafana folder or dashboard
75
+
76
+
1. In the Grafana UI, open a folder or a dashboard.
77
+
1. In the **Permissions** tab, select **Add a permission**.
78
+
79
+
:::image type="content" source="media/azure-ad-group-sync/add-permission.png" alt-text="Screenshot of the Azure portal, selecting Add a permission." lightbox="media/azure-ad-group-sync/add-permission.png":::
80
+
81
+
1. Under **Add permission for**, select **Team**, then select the team name, the **View**, **Edit** or **Admin** permission, and save. You can add permissions for a user, a team or a role.
82
+
83
+
:::image type="content" source="media/azure-ad-group-sync/add-permission-for-team.png" alt-text="Screenshot of the Grafana UI, adding a permission for a team in a Grafana folder.":::
84
+
85
+
> [!TIP]
86
+
> To check existing access permissions for a dashboard, open a dashboard and go to the **Permissions** tab. This page shows all permissions assigned for this dashboard and all inherited permissions.
87
+
88
+
:::image type="content" source="media/azure-ad-group-sync/view-permissions.png" alt-text="Screenshot of the Grafana UI, adding a permission for a team in a Grafana folder.":::
89
+
90
+
91
+
### Scope down access
64
92
65
-
### Scope down access to a specific folder
93
+
You can scale down access by removing permissions to access one or more folders.
66
94
67
-
To scope down access to a specific folder, remove permissions to all other folders.
95
+
For example, if a user, group of users has the Grafana Viewer role on a Grafana instance, disable their access to a folder by following these steps:
68
96
69
-
1. Decide which Microsoft Entra group will have access to the folder and give this group the desired permission on the Grafana instance.
70
-
1. In your Grafana workspace, open the **Access control (IAM)** menu select **Add** > **Add new role assignment**.
71
-
1. Select a role such as **Grafana Viewer**.
72
-
1. Assign access to the group of your choice.
73
-
1. Add group In Azure portal, use the Microsoft Entra Team Sync Settings page add an AAD group into Grafana Team. This will map users in an AAD group to a Grafana Team.
74
-
- In Grafana, grant this AAD group view permission to a folder
75
-
- Remove the view permission for view role on all other folders, that way having ‘Grafana Viewer’ role still doesn’t mean they get read access to all other folders.
97
+
1. In the Grafana UI, go to a folder you want to hide from the user
98
+
1. In the **Permissions** tab, select the **X** button to the right of the **Viewer** permission to remove this permission from this folder.
99
+
1. Repeat this step for all folders you want to hide from the user.
76
100
77
-
You can actually map multiple AAD groups to a single Grafana team, effectively granting multiple AAD groups view permission with just one Grafana team.
101
+
:::image type="content" source="media/azure-ad-group-sync/remove-permission.png" alt-text="Screenshot of the Grafana UI, removing the Viewer permission in a Grafana folder.":::
0 commit comments