what are the exact log analytics tables to query for azure storage firewall logs. Cannot find it in the documentation

Julio-14 25 Reputation points
2025-01-20T21:30:14.39+00:00

Hi,

I'm trying to have an alert that triggers when there is a change in the Azure Storage Account Firewall, particularly when there is a CIDR range change, I'd like to know which table what Kusto query I should use, I have tried AzureDiagnostics with no luck, also I have enabled Diagnostics for the Azure Storage Account but no luck neither

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,353 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Julio-14 25 Reputation points
    2025-01-27T20:09:24.7633333+00:00

    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" 
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.