Hi Shashank,
Could please try the below policy if you want to Audit if the three Audit log categories are enabled or not?
{
"mode": "All",
"policyRule": {
"if": {
"allOf": [
"field": "type",
"equals": "Microsoft.Storage/storageAccounts/blobServices"
]
},
"then": {
"effect": "auditIfNotExists",
"details": {
"type": "Microsoft.Insights/diagnosticSettings",
"existenceCondition": {
"allOf": [
{
"count": {
"field": "Microsoft.Insights/diagnosticSettings/logs[*]",
"where": {
"allOf": [
{
"field": "Microsoft.Insights/diagnosticSettings/logs[*].category",
"equals": "StorageRead"
},
{
"field": "Microsoft.Insights/diagnosticSettings/logs[*].enabled",
"equals": "true"
}
]
}
},
"equals": 1
},
{
"count": {
"field": "Microsoft.Insights/diagnosticSettings/logs[*]",
"where": {
"allOf": [
{
"field": "Microsoft.Insights/diagnosticSettings/logs[*].category",
"equals": "StorageWrite"
},
{
"field": "Microsoft.Insights/diagnosticSettings/logs[*].enabled",
"equals": "true"
}
]
}
},
"equals": 1
},
{
"count": {
"field": "Microsoft.Insights/diagnosticSettings/logs[*]",
"where": {
"allOf": [
{
"field": "Microsoft.Insights/diagnosticSettings/logs[*].category",
"equals": "StorageDelete"
},
{
"field": "Microsoft.Insights/diagnosticSettings/logs[*].enabled",
"equals": "true"
}
]
}
},
"equals": 1
}
]
}
}
}
},
"parameters": {
}
}