Configure Azure Activity logs to stream to specified Storage account from all subscriptions

Kaushik Ray 0 Reputation points
2025-01-21T15:16:39.2166667+00:00

I want to Configure Azure Activity logs to stream to specified Storage account from all subscriptions, is there any Built In policy available which can be leveraged to send activity logs from all subscription to a pre-defined storage account.

Azure Policy
Azure Policy
An Azure service that is used to implement corporate governance and standards at scale for Azure resources.
955 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Pavan Minukuri 1,045 Reputation points Microsoft Vendor
    2025-01-21T20:49:24.7733333+00:00

    Hi Kaushik Ray
    Welcome to Microsoft Q&A Forum!
    To stream Azure Activity logs to a specified storage account from all subscriptions, use a built-in policy that deploys diagnostic settings. Here are the steps for this configuration:

    1.Azure offers a community policy called "Deploy Diagnostic Settings for Activity Log to storage account," which automatically configures diagnostic settings to stream Activity Log logs to a specified storage account whenever a subscription is created or updated without these settings.
    Key Features of the Policy:

    Name: Deploy Diagnostic Settings for Activity Log to storage account

    Effect: DeployIfNotExists

    Mode: All

    Description: Ensures that the diagnostic settings for Activity Logs are configured to stream to a designated storage account when any subscription is missing these settings

    1.In the Azure portal, go to Storage accounts and create a new storage account to store the logs.
    2.Use Azure Policy to assign the "Deploy Diagnostic Settings for Activity Log to storage account" policy across your subscriptions, ensuring activity logs are sent to the specified storage account.
    3.After assigning the policy, verify that the diagnostic settings are applied by checking the Activity Log configuration in each subscription.
    4.You can monitor and manage the activity logs stored in your designated storage account as per your requirements.

    Please let us know if you required anything


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.