Skip to content

Commit 6020921

Browse files
authored
Merge pull request #222231 from guywi-ms/patch-33
Update manage-access.md
2 parents 0dd9fd9 + 2ac2a0d commit 6020921

File tree

1 file changed

+4
-96
lines changed

1 file changed

+4
-96
lines changed

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

Lines changed: 4 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -278,107 +278,15 @@ In addition to using the built-in roles for a Log Analytics workspace, you can c
278278

279279
## Set table-level read access
280280

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:
334-
335-
```json
336-
{
337-
"requests": [
338-
{
339-
"content": {
340-
"Id": "<GUID_1>",
341-
"Properties": {
342-
"PrincipalId": "<User_object_ID>",
343-
"PrincipalType": "User",
344-
"RoleDefinitionId": "<custom_role_ID>",
345-
"Scope": "/subscriptions/<subscription_ID>/resourceGroups/<resource_group_name>/providers/Microsoft.OperationalInsights/workspaces/<workspace_name>/Tables/<table_name>",
346-
"Condition": null,
347-
"ConditionVersion": null
348-
}
349-
},
350-
"httpMethod": "PUT",
351-
"name": "<GUID_2>",
352-
"requestHeaderDetails": {
353-
"commandName": "Microsoft_Azure_AD."
354-
},
355-
"url": "/subscriptions/<subscription_ID>/resourceGroups/<resource_group_name>/providers/Microsoft.OperationalInsights/workspaces/<workspace_name>/Tables/<table_name>/providers/Microsoft.Authorization/roleAssignments/<GUID_1>?api-version=2020-04-01-preview"
356-
}
357-
]
358-
}
359-
```
360-
361-
Where:
362-
- 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).
374282

375283
To define access to a particular table, create a [custom role](../../role-based-access-control/custom-roles.md):
376284

377285
* Set the user permissions in the **Actions** section of the role definition.
378286
* Use `Microsoft.OperationalInsights/workspaces/query/*` to grant access to all tables.
379287
* 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.
380288

381-
#### Examples
289+
### Examples
382290

383291
Here are examples of custom role actions to grant and deny access to specific tables.
384292

@@ -417,7 +325,7 @@ Grant access to all tables except the _SecurityAlert_ table:
417325
],
418326
```
419327

420-
#### Custom tables
328+
### Custom tables
421329

422330
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).
423331

@@ -440,7 +348,7 @@ Some custom logs come from sources that aren't directly associated to a specific
440348

441349
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.
442350

443-
#### Considerations
351+
### Considerations
444352

445353
- 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.
446354
- 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

Comments
 (0)