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
+4-96Lines changed: 4 additions & 96 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -278,107 +278,15 @@ In addition to using the built-in roles for a Log Analytics workspace, you can c
278
278
279
279
## Set table-level read access
280
280
281
-
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:
282
-
283
-
1. Create a custom role that grants read access to table data, based on the built-in Azure Monitor Logs **Reader** role:
284
-
285
-
1. Navigate to your workspace and select **Access control (IAM)** > **Roles**.
286
-
287
-
1. Right-click the **Reader** role and select **Clone**.
288
-
289
-
:::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":::
290
-
291
-
This opens the **Create a custom role** screen.
292
-
293
-
1. On the **Basics** tab of the screen enter a **Custom role name** value and, optionally, provide a description.
294
-
295
-
:::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":::
296
-
297
-
1. Select the **JSON** tab > **Edit** and edit the `"actions"` section to include only `Microsoft.OperationalInsights/workspaces/query/read` and select **Save**.
298
-
299
-
:::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":::
300
-
301
-
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 (IAM)** > **Roles**.
304
-
1. Select your custom role and click on **View**.
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.
313
-
314
-
1. Assign your custom role to the relevant users or groups:
315
-
1. Select **Access control (IAM)** > **Add** > **Add role assignment**.
316
-
317
-
:::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":::
318
-
319
-
1. Select the custom role you created and select **Next**.
320
-
321
-
:::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":::
322
-
323
-
324
-
This opens the **Members** tab of the **Add custom role assignment** screen.
325
-
326
-
1. Click **+ Select members** to open the **Select members** screen.
327
-
328
-
:::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":::
329
-
330
-
1. Search for and select the relevant user or group and click **Select**.
331
-
1. Select **Review and assign**.
332
-
333
-
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.
363
-
- `<custom_role_ID>` is the `/providers/Microsoft.Authorization/roleDefinitions/<definition_id>` value you copied earlier.
364
-
- `<subscription_ID>` is the ID of the subscription related to the workspace.
365
-
- `<resource_group_name>` is the resource group of the workspace.
366
-
- `<workspace_name>` is the name of the workspace.
367
-
- `<table_name>` is the name of the table to which you want to assign the user or group permission to read data from.
368
-
369
-
### Legacy method of setting table-level read access
370
-
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.
372
-
373
-
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).
281
+
[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).
374
282
375
283
To define access to a particular table, create a [custom role](../../role-based-access-control/custom-roles.md):
376
284
377
285
* Set the user permissions in the **Actions** section of the role definition.
378
286
* Use `Microsoft.OperationalInsights/workspaces/query/*` to grant access to all tables.
379
287
* 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.
380
288
381
-
#### Examples
289
+
### Examples
382
290
383
291
Here are examples of custom role actions to grant and deny access to specific tables.
384
292
@@ -417,7 +325,7 @@ Grant access to all tables except the _SecurityAlert_ table:
417
325
],
418
326
```
419
327
420
-
#### Custom tables
328
+
### Custom tables
421
329
422
330
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).
423
331
@@ -440,7 +348,7 @@ Some custom logs come from sources that aren't directly associated to a specific
440
348
441
349
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.
442
350
443
-
#### Considerations
351
+
### Considerations
444
352
445
353
- 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.
446
354
- 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