Hi @Keshavulu Dasari ,
I ended up querying the Azure Analytics, was not able to find out what did I was missing to retrieve the data from azure diagnostics, instead I went to Activity Log, then do the Export of the Activity Log into Log Analytics Workspace and from there used below query,
What I don't like is that the emails not always come and that is crucial for the alerting
Thanks,
J
AzureActivity
| where OperationNameValue == "MICROSOFT.STORAGE/STORAGEACCOUNTS/WRITE"
| order by TimeGenerated desc
| summarize arg_max(TimeGenerated, *) by CorrelationId
| top 2 by TimeGenerated
| order by TimeGenerated desc
| project
CorrelationId,
EventDataId,
ResourceGroup,
OperationNameValue,
_ResourceId,
TimeGenerated,
networkAcls = extract_json("$.properties.networkAcls", extract_json("$.responseBody", Properties, typeof(string)), typeof(string)),
ipRules = extract_json("$.properties.networkAcls.ipRules", extract_json("$.responseBody", Properties, typeof(string)), typeof(string)),
publicNetWorkAccess = extract_json("$.properties.publicNetworkAccess", extract_json("$.responseBody", Properties, typeof(string)), typeof(string))
//NetworkAcls
| extend nextValueNetworkAcls=next(networkAcls)
| extend doesNetworkAclsChanged = iff(networkAcls != nextValueNetworkAcls, "Yes", "No")
//Public Network Access
| extend nextPublicNetWorkAccess=next(publicNetWorkAccess)
| extend doesPublicNetWorkAccessChanged = iff(publicNetWorkAccess != nextPublicNetWorkAccess, "Yes", "No")
| top 1 by TimeGenerated
| project
TimeGenerated,
CorrelationId,
EventDataId,
ResourceGroup,
OperationNameValue,
_ResourceId,
doesNetworkAclsChanged,
//doesIPRulesChanged,
doesPublicNetWorkAccessChanged
| where doesNetworkAclsChanged == "Yes" or doesPublicNetWorkAccessChanged == "Yes"