I am trying to create alerts when someone changes the IAM RBAC roles or permissions on azure storage accounts using Kusto query

81 Views Asked by At
AzureActivity
| where ResourceProviderValue contains "Microsoft.storage" and CategoryValue contains "Administrative"
| where OperationNameValue ==
"Microsoft. Authorization/roleAssignments/write",
"Microsoft. Authorization/roleAssignments/delete",
"Microsoft. Authorization/roleDefinitions/write",
"Microsoft. Authorization/roleDefinitions/delete"
| where ActivityStatusValue in (""Started", "Succeeded", "Failed")
| project TimeGenerated, ResourceId, OperationNameValue, ActivityStatus
1

There are 1 best solutions below

2
Venkat V On

I am trying to create alerts when someone changes the IAM RBAC roles or permissions on azure storage accounts using Kusto query.

Alternatively, you can create an alert from the portal when someone changes the IAM RBAC roles on a storage account, follow these steps.

  1. Go to Azure Storage account > Activity log > select any Create role assignment operation > New alert rule

enter image description here

  1. Select the scope (ex: subscription) > Resource type : Storage accounts.

enter image description here

  1. Select the Signal: Create a role assignment

enter image description here

  1. Create an action group using your email ID or choose an existing one.

  2. To fetch all role assignment and deletion, select all in the status field of the condition tab.

enter image description here

  1. After completing all the steps above, you will receive an alert if anyone changes the RBAC role on the storage account, as shown below.

enter image description here