Skip to content

Commit 3fb524c

Browse files
authored
Update manage-access.md
1 parent a4a95da commit 3fb524c

File tree

1 file changed

+26
-15
lines changed

1 file changed

+26
-15
lines changed

articles/azure-monitor/logs/manage-access.md

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The factors that define the data you can access are described in the following t
2929
| [Access mode](#access-mode) | Method used to access the workspace. Defines the scope of the data available and the access control mode that's applied. |
3030
| [Access control mode](#access-control-mode) | Setting on the workspace that defines whether permissions are applied at the workspace or resource level. |
3131
| [Azure role-based access control (RBAC)](#azure-rbac) | Permissions applied to individuals or groups of users for the workspace or resource sending data to the workspace. Defines what data you have access to. |
32-
| [Table-level Azure RBAC](#set-table-level-read-access-preview) | Optional permissions that define specific data types in the workspace that you can access. Apply to all users no matter your access mode or access control mode. |
32+
| [Table-level Azure RBAC](#set-table-level-read-access) | Optional permissions that define specific data types in the workspace that you can access. Apply to all users no matter your access mode or access control mode. |
3333

3434
## Access mode
3535

@@ -56,14 +56,14 @@ The following table summarizes the access modes:
5656
|:---|:---|:---|
5757
| Who is each model intended for? | Central administration.<br>Administrators who need to configure data collection and users who need access to a wide variety of resources. Also currently required for users who need to access logs for resources outside of Azure. | Application teams.<br>Administrators of Azure resources being monitored. Allows them to focus on their resource without filtering. |
5858
| What does a user require to view logs? | Permissions to the workspace.<br>See "Workspace permissions" in [Manage access using workspace permissions](./manage-access.md#azure-rbac). | Read access to the resource.<br>See "Resource permissions" in [Manage access using Azure permissions](./manage-access.md#azure-rbac). Permissions can be inherited from the resource group or subscription or directly assigned to the resource. Permission to the logs for the resource will be automatically assigned. The user doesn't require access to the workspace.|
59-
| What is the scope of permissions? | Workspace.<br>Users with access to the workspace can query all logs in the workspace from tables they have permissions to. See [Set table-level read access](./manage-access.md#set-table-level-read-access-preview). | Azure resource.<br>Users can query logs for specific resources, resource groups, or subscriptions they have access to in any workspace, but they can't query logs for other resources. |
59+
| What is the scope of permissions? | Workspace.<br>Users with access to the workspace can query all logs in the workspace from tables they have permissions to. See [Set table-level read access](./manage-access.md#set-table-level-read-access). | Azure resource.<br>Users can query logs for specific resources, resource groups, or subscriptions they have access to in any workspace, but they can't query logs for other resources. |
6060
| How can a user access logs? | On the **Azure Monitor** menu, select **Logs**.<br><br>Select **Logs** from **Log Analytics workspaces**.<br><br>From Azure Monitor [workbooks](../best-practices-analysis.md#workbooks). | Select **Logs** on the menu for the Azure resource. Users will have access to data for that resource.<br><br>Select **Logs** on the **Azure Monitor** menu. Users will have access to data for all resources they have access to.<br><br>Select **Logs** from **Log Analytics workspaces**. Users will have access to data for all resources they have access to.<br><br>From Azure Monitor [workbooks](../best-practices-analysis.md#workbooks). |
6161

6262
## Access control mode
6363

6464
The *access control mode* is a setting on each workspace that defines how permissions are determined for the workspace.
6565

66-
* **Require workspace permissions**. This control mode doesn't allow granular Azure RBAC. To access the workspace, the user must be [granted permissions to the workspace](#azure-rbac) or to [specific tables](#set-table-level-read-access-preview).
66+
* **Require workspace permissions**. This control mode doesn't allow granular Azure RBAC. To access the workspace, the user must be [granted permissions to the workspace](#azure-rbac) or to [specific tables](#set-table-level-read-access).
6767

6868
If a user accesses the workspace in [workspace-context mode](#access-mode), they have access to all data in any table they've been granted access to. If a user accesses the workspace in [resource-context mode](#access-mode), they have access to only data for that resource in any table they've been granted access to.
6969

@@ -245,24 +245,24 @@ The `/read` permission is usually granted from a role that includes _\*/read or_
245245

246246
In addition to using the built-in roles for a Log Analytics workspace, you can create custom roles to assign more granular permissions. Here are some common examples.
247247

248-
**Example 1: Grant a user access to log data from their resources.**
248+
Grant a user access to log data from their resources:
249249

250250
- Configure the workspace access control mode to *use workspace or resource permissions*.
251251
- Grant users `*/read` or `Microsoft.Insights/logs/*/read` permissions to their resources. If they're already assigned the [Log Analytics Reader](../../role-based-access-control/built-in-roles.md#reader) role on the workspace, it's sufficient.
252252

253-
**Example 2: Grant a user access to log data from their resources and configure their resources to send logs to the workspace.**
253+
Grant a user access to log data from their resources and configure their resources to send logs to the workspace:
254254

255255
- Configure the workspace access control mode to *use workspace or resource permissions*.
256256
- Grant users the following permissions on the workspace: `Microsoft.OperationalInsights/workspaces/read` and `Microsoft.OperationalInsights/workspaces/sharedKeys/action`. With these permissions, users can't perform any workspace-level queries. They can only enumerate the workspace and use it as a destination for diagnostic settings or agent configuration.
257257
- Grant users the following permissions to their resources: `Microsoft.Insights/logs/*/read` and `Microsoft.Insights/diagnosticSettings/write`. If they're already assigned the [Log Analytics Contributor](../../role-based-access-control/built-in-roles.md#contributor) role, assigned the Reader role, or granted `*/read` permissions on this resource, it's sufficient.
258258

259-
**Example 3: Grant a user access to log data from their resources without being able to read security events and send data.**
259+
Grant a user access to log data from their resources without being able to read security events and send data:
260260

261261
- Configure the workspace access control mode to *use workspace or resource permissions*.
262262
- Grant users the following permissions to their resources: `Microsoft.Insights/logs/*/read`.
263263
- Add the following NonAction to block users from reading the SecurityEvent type: `Microsoft.Insights/logs/SecurityEvent/read`. The NonAction shall be in the same custom role as the action that provides the read permission (`Microsoft.Insights/logs/*/read`). If the user inherits the read action from another role that's assigned to this resource or to the subscription or resource group, they could read all log types. This scenario is also true if they inherit `*/read` that exists, for example, with the Reader or Contributor role.
264264

265-
**Example 4: Grant a user access to log data from their resources and read all Azure AD sign-in and read Update Management solution log data from the workspace.**
265+
Grant a user access to log data from their resources and read all Azure AD sign-in and read Update Management solution log data from the workspace:
266266

267267
- Configure the workspace access control mode to *use workspace or resource permissions*.
268268
- Grant users the following permissions on the workspace:
@@ -276,21 +276,21 @@ In addition to using the built-in roles for a Log Analytics workspace, you can c
276276
- `Microsoft.OperationalInsights/workspaces/query/ComputerGroup/read`: Required to be able to use Update Management solutions
277277
- Grant users the following permissions to their resources: `*/read`, assigned to the Reader role, or `Microsoft.Insights/logs/*/read`
278278

279-
## Set table-level read access (preview)
279+
## Set table-level read access
280280

281281
To create a [custom role](../../role-based-access-control/custom-roles.md) that lets specific users or groups read data from specific tables in a workspace:
282282

283-
1. Create a custom role that grants users permission to execute queries in the Log Analytics workspace, based on the built-in Azure Monitor Logs **Reader** role:
283+
1. Create a custom role that grants read access to table data, based on the built-in Azure Monitor Logs **Reader** role:
284284

285-
1. Navigate to your workspace and select **Access control (IAM)** > **Roles**.
285+
1. Navigate to your workspace and select **Access control (AIM)** > **Roles**.
286286

287287
1. Right-click the **Reader** role and select **Clone**.
288288

289289
:::image type="content" source="media/manage-access/access-control-clone-role.png" alt-text="Screenshot that shows the Roles tab of the Access control screen with the clone button highlighted for the Reader role." lightbox="media/manage-access/access-control-clone-role.png":::
290290

291291
This opens the **Create a custom role** screen.
292292

293-
1. On the **Basics** tab of the screen, enter a **Custom role name** value and, optionally, provide a description.
293+
1. On the **Basics** tab of the screen enter a **Custom role name** value and, optionally, provide a description.
294294

295295
:::image type="content" source="media/manage-access/manage-access-create-custom-role.png" alt-text="Screenshot that shows the Basics tab of the Create a custom role screen with the Custom role name and Description fields highlighted." lightbox="media/manage-access/manage-access-create-custom-role.png":::
296296

@@ -299,6 +299,17 @@ To create a [custom role](../../role-based-access-control/custom-roles.md) that
299299
:::image type="content" source="media/manage-access/manage-access-create-custom-role-json.png" alt-text="Screenshot that shows the JSON tab of the Create a custom role screen with the actions section of the JSON file highlighted." lightbox="media/manage-access/manage-access-create-custom-role-json.png":::
300300

301301
1. Select **Review + Create** at the bottom of the screen, and then **Create** on the next page.
302+
1. Copy the custom role ID:
303+
1. Select **Access control (AIM)** > **Roles**.
304+
1. Right-click on your custom role and select **Edit**.
305+
306+
This opens the **Custom Role** screen.
307+
308+
:::image type="content" source="media/manage-access/manage-access-role-definition-id.png" alt-text="Screenshot that shows the JSON tab of the Custom Role screen with the ID field highlighted." lightbox="media/manage-access/manage-access-role-definition-id.png":::
309+
310+
1. Select **JSON** and copy the `id` field.
311+
312+
You'll need the `/providers/Microsoft.Authorization/roleDefinitions/<definition_id>` value when you call the `https://management.azure.com/batch?api-version=2020-06-01` POST API.
302313

303314
1. Assign your custom role to the relevant users or groups:
304315
1. Select **Access control (AIM)** > **Add** > **Add role assignment**.
@@ -328,9 +339,9 @@ To create a [custom role](../../role-based-access-control/custom-roles.md) that
328339
"content": {
329340
"Id": "<GUID_1>",
330341
"Properties": {
331-
"PrincipalId": "<user_object_ID>",
342+
"PrincipalId": "<User_object_ID>",
332343
"PrincipalType": "User",
333-
"RoleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7",
344+
"RoleDefinitionId": "<custom_role_ID>",
334345
"Scope": "/subscriptions/<subscription_ID>/resourceGroups/<resource_group_name>/providers/Microsoft.OperationalInsights/workspaces/<workspace_name>/Tables/<table_name>",
335346
"Condition": null,
336347
"ConditionVersion": null
@@ -349,15 +360,15 @@ To create a [custom role](../../role-based-access-control/custom-roles.md) that
349360

350361
Where:
351362
- You can generate a GUID for `<GUID 1>` and `<GUID 2>` using any GUID generator.
352-
- `<user_object_ID>` is the object ID of the user to which you want to grant table read access.
363+
- `<custom_role_ID>` is the `/providers/Microsoft.Authorization/roleDefinitions/<definition_id>` value you copied earlier.
353364
- `<subscription_ID>` is the ID of the subscription related to the workspace.
354365
- `<resource_group_name>` is the resource group of the workspace.
355366
- `<workspace_name>` is the name of the workspace.
356367
- `<table_name>` is the name of the table to which you want to assign the user or group permission to read data from.
357368

358369
### Legacy method of setting table-level read access
359370

360-
[Azure custom roles](../../role-based-access-control/custom-roles.md) let you grant access to specific tables in the workspace, although we recommend defining [table-level read access](#set-table-level-read-access-preview) as described above.
371+
[Azure custom roles](../../role-based-access-control/custom-roles.md) let you grant access to specific tables in the workspace, although we recommend defining [table-level read access](#set-table-level-read-access) as described above.
361372

362373
Azure custom roles apply to workspaces with either workspace-context or resource-context [access control modes](#access-control-mode) regardless of the user's [access mode](#access-mode).
363374

0 commit comments

Comments
 (0)