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/azure-monitor/logs/manage-access.md
+95-5Lines changed: 95 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -297,15 +297,105 @@ In addition to using the built-in roles for a Log Analytics workspace, you can c
297
297
298
298
## Set table-level read access
299
299
300
-
[Azure custom roles](../../role-based-access-control/custom-roles.md) let you grant specific users or groups access to specific tables in the workspace. 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).
300
+
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:
301
+
302
+
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:
303
+
304
+
1. Navigate to your workspace and select **Access control (IAM)** > **Roles**.
305
+
306
+
1. Right-click the **Reader** role and select **Clone**.
307
+
308
+
:::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":::
309
+
310
+
This opens the **Create a custom role** screen.
311
+
312
+
1. On the **Basics** tab of the screen, enter a **Custom role name** value and, optionally, provide a description.
313
+
314
+
:::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":::
1. In the `"not actions"` section, add `Microsoft.OperationalInsights/workspaces/sharedKeys/read`.
326
+
327
+
:::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":::
328
+
329
+
1. Select **Save** > **Review + Create** at the bottom of the screen, and then **Create** on the next page.
330
+
331
+
1. Assign your custom role to the relevant users or groups:
332
+
1. Select **Access control (AIM)** > **Add** > **Add role assignment**.
333
+
334
+
:::image type="content" source="media/manage-access/manage-access-add-role-assignment-button.png" alt-text="Screenshot that shows the Access control screen with the Add role assignment button highlighted." lightbox="media/manage-access/manage-access-add-role-assignment-button.png":::
335
+
336
+
1. Select the custom role you created and select **Next**.
337
+
338
+
:::image type="content" source="media/manage-access/manage-access-add-role-assignment-screen.png" alt-text="Screenshot that shows the Add role assignment screen with a custom role and the Next button highlighted." lightbox="media/manage-access/manage-access-add-role-assignment-screen.png":::
339
+
340
+
341
+
This opens the **Members** tab of the **Add custom role assignment** screen.
342
+
343
+
1. Click **+ Select members** to open the **Select members** screen.
344
+
345
+
:::image type="content" source="media/manage-access/manage-access-add-role-assignment-select-members.png" alt-text="Screenshot that shows the Select members screen." lightbox="media/manage-access/manage-access-add-role-assignment-select-members.png":::
346
+
347
+
1. Search for and select the relevant user or group and click **Select**.
348
+
1. Select **Review and assign**.
349
+
350
+
1. Grant the users or groups read access to specific tables in a workspace by calling the `https://management.azure.com/batch?api-version=2020-06-01` POST API and sending the following details in the request body:
- You can generate a GUID for `<GUID 1>` and `<GUID 2>` using any GUID generator.
380
+
- `<user_object_ID>` is the object ID of the user to which you want to grant table read access.
381
+
- `<subscription_ID>` is the ID of the subscription related to the workspace.
382
+
- `<resource_group_name>` is the resource group of the workspace.
383
+
- `<workspace_name>` is the name of the workspace.
384
+
- `<table_name>` is the name of the table to which you want to assign the user or group permission to read data from.
385
+
386
+
### Legacy method of setting table-level read access
387
+
388
+
[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.
389
+
390
+
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).
301
391
302
392
To define access to a particular table, create a [custom role](../../role-based-access-control/custom-roles.md):
303
393
304
394
* Set the user permissions in the **Actions** section of the role definition.
305
395
* Use `Microsoft.OperationalInsights/workspaces/query/*` to grant access to all tables.
306
396
* To exclude access to specific tables when you use a wildcard in **Actions**, list the tables excluded tables in the **NotActions** section of the role definition.
307
397
308
-
### Examples
398
+
#### Examples
309
399
310
400
Here are examples of custom role actions to grant and deny access to specific tables.
311
401
@@ -344,14 +434,14 @@ Grant access to all tables except the _SecurityAlert_ table:
344
434
],
345
435
```
346
436
347
-
### Custom tables
437
+
#### Custom tables
348
438
349
439
Custom tables store data you collect from data sources such as [text logs](../agents/data-sources-custom-logs.md) and the [HTTP Data Collector API](data-collector-api.md). To identify the table type, [view table information in Log Analytics](./log-analytics-tutorial.md#view-table-information).
350
440
351
441
> [!NOTE]
352
442
> Tables created by the [Logs ingestion API](../essentials/../logs/logs-ingestion-api-overview.md) don't yet support table-level RBAC.
353
443
354
-
You can't grant access to individual custom log table level, but you can grant access to all custom log tables. To create a role with access to all custom log tables, create a custom role by using the following actions:
444
+
You can't grant access to individual custom log tables, but you can grant access to all custom logs. To create a role with access to all custom log tables, create a custom role by using the following actions:
355
445
356
446
```
357
447
"Actions": [
@@ -367,7 +457,7 @@ Some custom logs come from sources that aren't directly associated to a specific
367
457
368
458
For example, if a specific firewall is sending custom logs, create a resource group called *MyFireWallLogs*. Make sure that the API requests contain the resource ID of *MyFireWallLogs*. The firewall log records are then accessible only to users who were granted access to *MyFireWallLogs* or those users with full workspace access.
369
459
370
-
### Considerations
460
+
#### Considerations
371
461
372
462
- If a user is granted global read permission with the standard Reader or Contributor roles that include the _\*/read_ action, it will override the per-table access control and give them access to all log data.
373
463
- If a user is granted per-table access but no other permissions, they can access log data from the API but not from the Azure portal. To provide access from the Azure portal, use Log Analytics Reader as its base role.
0 commit comments