Skip to content

Commit 435d960

Browse files
authored
Merge pull request #245661 from KrishnaG-MSFT/patch-319
(AzureCXP) MicrosoftDocs/azure-docs#112372
2 parents fca7f1a + 8f95abd commit 435d960

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

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

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,22 +64,30 @@ Assign a role assignment using the [az role assignment create](/cli/azure/role/a
6464

6565
In the code below, replace the following placeholders:
6666

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.
67+
- `<assignee>`: If its --assignee parameter then enter the assignee's object ID or user sign-in name or service principal name. If its --assignee-object-id parameter then enter object IDs for users or groups or service principals or managed identities. For managed identities use the principal ID. For service principals, use the object ID and not the app ID. For more information, refer [az role assignment create](/cli/azure/role/assignment#az-role-assignment-create) command.
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.
7070

7171
```azurecli
7272
az role assignment create --assignee "<assignee>" \
7373
--role "<roleNameOrId>" \
7474
--scope "<scope>"
7575
```
7676

77+
or
78+
79+
```azurecli
80+
az role assignment create --assignee-object-id "<assignee>" --assignee-principal-type "<ForeignGroup / Group / ServicePrincipal / User>" \
81+
--role "<roleNameOrId>" \
82+
--scope "<scope>"
83+
```
84+
7785
Example: assigning permission for an Azure Managed Grafana instance to access an Application Insights resource using a managed identity.
7886

7987
```azurecli
80-
az role assignment create --assignee "/subscriptions/abcdef01-2345-6789-0abc-def012345678/resourcegroups/my-rg/providers/Microsoft.Dashboard/grafana/mygrafanaworkspace" \
88+
az role assignment create --assignee-object-id "abcdef01-2345-6789-0abc-def012345678" --assignee-principal-type "ServicePrincipal" \
8189
--role "Monitoring Reader" \
82-
--scope "/subscriptions/abcdef01-2345-6789-0abc-def012345678/resourcegroups/my-rg/providers/microsoft.insights/components/myappinsights/
90+
--scope "/subscriptions/abcdef01-2345-6789-0abc-def012345678/resourcegroups/my-rg/providers/microsoft.insights/components/myappinsights/"
8391
```
8492

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

0 commit comments

Comments
 (0)