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
The data in a Log Analytics workspace that you can access is determined by a combination of the following factors:
15
+
The factors that determine which data you can access in a Log Analytics workspace are:
16
16
17
17
- The settings on the workspace itself.
18
-
-The access to resources sending data to the workspace.
18
+
-Your access permissions to resources that send data to the workspace.
19
19
- The method used to access the workspace.
20
20
21
-
This article describes how access is managed and how to perform any required configuration.
21
+
This article describes how to manage access to data in a Log Analytics workspace.
22
22
23
23
## Overview
24
24
@@ -234,7 +234,7 @@ The Log Analytics Contributor role includes the following Azure actions:
234
234
235
235
### Resource permissions
236
236
237
-
When users query logs from a workspace by using[resource-context access](#access-mode), they'll have the following permissions on the resource:
237
+
To read data from or send data to a workspace in the[resource context](#access-mode), you need these permissions on the resource:
238
238
239
239
| Permission | Description |
240
240
| ---------- | ----------- |
@@ -298,33 +298,19 @@ In addition to using the built-in roles for a Log Analytics workspace, you can c
298
298
299
299
## Set table-level read access
300
300
301
-
Table-level access allows you to let specific people read data only from a specific set of tables. It applies both for workspace-context and resource-context. There are two methods to define table-level permissions:
302
-
* By assigning permissions to the table sub-resource under the workspace resource - this is the recommended method that is described in this section. This method is currently in **preview**.
303
-
* By assigning special actions that contain table name to the workspace resource - this is the legacy method that is described in the next section. It has some limitations around custom log tables.
304
-
305
-
Table-level RBAC is applied during query execution. It does not apply to metadata retrieval calls. For that reason, tables will appear in the list of tables even if they are not available to the user.
301
+
Table-level access settings let you grant specific users or groups read-only permission to data from certain tables. Users with table-level read access can read data from the specified tables in both the workspace and the resource context.
306
302
307
303
> [!NOTE]
308
-
> The recommended table-level access method described here does not apply during preview to Microsoft Sentinel Detection Rules. These rules might have access to more tables than intended.
309
-
310
-
In order to apply table-level RBAC for a user, two assignments shall be made:
304
+
> We recommend using the method described here, which is currently in **preview**, to define table-level access. Alternatively, you can use the [legacy method of setting table-level read access](#legacy-method-of-setting-table-level-read-access), which has some limitations related to custom log tables. During preview, the recommended method described here does not apply to Microsoft Sentinel Detection Rules, which might have access to more tables than intended. Before using either method, see [Table-level access considerations and limitations](#table-level-access-considerations-and-limitations).
311
305
312
-
1. Assign the user the ability to read the workspace details and to run a query without granting the ability to run a query on tables. This is done by assigning a special custom role on the workspace that has only the following actions:
2. Assign the user a read permissions on the specific table sub-resource. Any role that has */read will be sufficient such as **Reader** role or **Log Analytics Reader** role. As table is a sub-resource of workspace, the workspace admins can also perform action on a specific table.
306
+
Granting table-level read access involves assigning a user two roles:
319
307
320
-
> [!WARNING]
321
-
> If the user has other assignments on the workspace, directly or via inheritence (e.g. user has Reader on the subscription that contains the workspace), the user will be able to access all tables in the workspace.
308
+
- At the workspace level - a custom role that provides limited permissions to read workspace details and run a query in the workspace, but not to read data from any tables.
309
+
- At the table level - a **Reader** role, scoped to the specific table.
322
310
311
+
To grant a user or group table-level read access to a specific table:
323
312
324
-
325
-
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:
326
-
327
-
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:
313
+
1. Create a [custom role](../../role-based-access-control/custom-roles.md) at the workspace level to let users read workspace details and run a query in the workspace, without providing read access to data in any tables:
328
314
329
315
1. Navigate to your workspace and select **Access control (IAM)** > **Roles**.
330
316
@@ -334,26 +320,34 @@ To create a [custom role](../../role-based-access-control/custom-roles.md) that
334
320
335
321
This opens the **Create a custom role** screen.
336
322
337
-
1. On the **Basics** tab of the screen, enter a **Custom role name** value and, optionally, provide a description.
323
+
1. On the **Basics** tab of the screen:
324
+
1. Enter a **Custom role name** value and, optionally, provide a description.
325
+
1. Set **Baseline permissions** to **Start from scratch**.
338
326
339
327
:::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":::
:::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":::
353
347
354
348
1. Select **Save** > **Review + Create** at the bottom of the screen, and then **Create** on the next page.
355
349
356
-
1. Assign your custom role to the relevant users or groups:
350
+
1. Assign your custom role to the relevant user:
357
351
1. Select **Access control (AIM)** > **Add** > **Add role assignment**.
358
352
359
353
:::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":::
@@ -369,45 +363,23 @@ To create a [custom role](../../role-based-access-control/custom-roles.md) that
369
363
370
364
:::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":::
371
365
372
-
1. Search for and select the relevant user or group and click **Select**.
366
+
1. Search for and select a user and click **Select**.
373
367
1. Select **Review and assign**.
368
+
369
+
1. Grant the user read access to a specific table:
374
370
375
-
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.
405
-
- `<user_object_ID>` is the object ID of the user to which you want to grant table read access.
406
-
- `<subscription_ID>` is the ID of the subscription related to the workspace.
407
-
- `<resource_group_name>` is the resource group of the workspace.
408
-
- `<workspace_name>` is the name of the workspace.
409
-
- `<table_name>` is the name of the table to which you want to assign the user or group permission to read data from.
371
+
1. From the **Log Analytics workspaces** menu, select **Tables**.
372
+
1. Select the ellipsis ( **...** ) to the right of your table and select **Access control (IAM)**.
373
+
374
+
:::image type="content" source="media/manage-access/table-level-access-control.png" alt-text="Screenshot that shows the Log Analytics workspace table management screen with the table-level access control button highlighted." lightbox="media/manage-access/manage-access-create-custom-role-json.png":::
375
+
376
+
1. On the **Access control (IAM)** screen, select **Add** > **Add role assignment**.
377
+
1. Select the **Reader** role and select **Next**.
378
+
1. Click **+ Select members** to open the **Select members** screen.
379
+
1. Search for and select the user and click **Select**.
380
+
1. Select **Review and assign**.
410
381
382
+
The user can now read data from this specific table.
411
383
### Legacy method of setting table-level read access
412
384
413
385
The legacy method of table-level also uses [Azure custom roles](../../role-based-access-control/custom-roles.md) to 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).
@@ -418,8 +390,6 @@ To define access to a particular table, create a [custom role](../../role-based-
418
390
* Use `Microsoft.OperationalInsights/workspaces/query/*` to grant access to all tables.
419
391
* 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.
420
392
421
-
#### Examples
422
-
423
393
Here are examples of custom role actions to grant and deny access to specific tables.
424
394
425
395
Grant access to the _Heartbeat_ and _AzureActivity_ tables:
@@ -457,13 +427,10 @@ Grant access to all tables except the _SecurityAlert_ table:
457
427
],
458
428
```
459
429
460
-
#### Custom tables
430
+
#### Limitations of the legacy method related to custom tables
461
431
462
432
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).
463
433
464
-
> [!NOTE]
465
-
> Tables created by the [Logs ingestion API](../essentials/../logs/logs-ingestion-api-overview.md) don't yet support table-level RBAC.
466
-
467
434
Using the legacy method of table-level access, you can't grant access to individual custom log tables at the 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:
468
435
469
436
```
@@ -474,11 +441,12 @@ Using the legacy method of table-level access, you can't grant access to individ
474
441
],
475
442
```
476
443
477
-
### Considerations regarding table-level access
444
+
### Table-level access considerations and limitations
478
445
479
-
- 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.
480
-
- 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.
481
-
- Administrators and owners of the subscription will have access to all data types regardless of any other permission settings.
446
+
- In the Log Analytics UI, users with table-level can see the list of all tables in the workspace, but can only retrieve data from tables to which they have access.
447
+
- The standard Reader or Contributor roles, which include the _\*/read_ action, override table-level access control and give users access to all log data.
448
+
- A user with table-level access but no workspace-level permissions can access log data from the API but not from the Azure portal.
449
+
- Administrators and owners of the subscription have access to all data types regardless of any other permission settings.
482
450
- Workspace owners are treated like any other user for per-table access control.
483
451
- Assign roles to security groups instead of individual users to reduce the number of assignments. This practice will also help you use existing group management tools to configure and verify access.
0 commit comments