VNet Flow Logs and Traffic Analytics managed identity - required permissions

Roos, Fabian 25 Reputation points
2026-04-15T13:13:58.0333333+00:00

Hi there!

We want to use VNet flow logs and Traffic Analytics with managed identity authentication as described in the article "Managed identity for virtual network flow logs".

The prerequisites contain the required permissions of the managed identity on the Storage Account that is used for raw data:

Storage Blob Data Contributor role assigned to the managed identity

However, I can't find any information about the required permissions on the Log Analytics Workspace that is used for Traffic Analytics. I already found this article: "Azure role-based access control permissions required to use Network Watcher" which includes the required permissions for the "account you log into Azure with", but there is no informationen about the required permissions for the managed identity that will be assigned to the flow log.

Could you please clarify:

  • What permissions does the account creating the flow log resource in Azure need?
  • What permissions does the managed identity assigned to the flow log need on the Storage Account and on the Log Analytics workspace?

Thanks in advance! :)

Azure Network Watcher
Azure Network Watcher

An Azure service that is used to monitor, diagnose, and gain insights into network performance and health.

0 comments No comments

Answer accepted by question author
Ravi Varma Mudduluru 12,625 Reputation points Microsoft External Staff Moderator
2026-04-16T12:20:59.44+00:00

Hello @ Roos, Fabian,

Thanks for reaching out to Microsoft Q&A.

I understand you're setting up Virtual Network Flow Logs with Traffic Analytics using a user-assigned managed identity and want to clarify the exact permissions needed.

1. For the account (or service principal) creating/enabling the Flow Log + Traffic Analytics:

You’ll need the permissions listed in the official Network Watcher RBAC documentation. This typically includes:

  • Microsoft.Network/networkWatchers/flowLogs/* actions
  • Additional permissions for Traffic Analytics, such as read access to the Log Analytics workspace, shared keys actions, and data collection rule/endpoint management.

Recommended approach: Assign the Network Contributor role (plus Log Analytics Contributor or Monitoring Contributor) to your creating account at the appropriate scope (usually the subscription containing the Log Analytics workspace).

Key doc: Azure role-based access control permissions required to use Network Watcher

2. For the user-assigned managed identity attached to the Flow Log:

  • Storage Account (for raw flow log storage): Assign the Storage Blob Data Contributor role. This is the only permission Microsoft requires from the managed identity.
  • Log Analytics Workspace (used by Traffic Analytics): No permissions or role assignments are needed on the managed identity.

The managed identity is used only to securely read the raw flow logs from your storage account. Traffic Analytics (a Microsoft-managed service) then processes the data and writes the results into your Log Analytics workspace using its own backend permissions no extra RBAC on the MI is required.

This is explicitly covered here: Managed Identity for Virtual Network Flow Logs

Recommended Next Steps

  1. Create (or use an existing) user-assigned managed identity.
  2. Assign Storage Blob Data Contributor to it on your target Storage Account.
  3. When creating or updating the Flow Log, select this managed identity and enable Traffic Analytics pointing to your Log Analytics workspace.

If you’re using PowerShell, here’s a quick example from the docs:

New-AzNetworkWatcherFlowLog -Name "MyFlowLog" `

If the above steps didn't resolve your issue, please check the private message and share the requested details there?

Please "Accept Answer" and "Upvote" if the information helped you. This will help us and others in the community as well.

Was this answer helpful?

1 person found this answer helpful.

1 additional answer

Sort by: Newest
  1. Marcin Policht 107.7K Reputation points MVP Volunteer Moderator
    2026-04-15T14:58:00.78+00:00

    To create a flow log resource in Azure, your account must have the Owner, Contributor, or Network Contributor role assigned at the subscription scope. If you use the Network Contributor role, ensure it includes specific actions for storage and Log Analytics, as standard inheritance from management groups is not supported for this feature.

    The user-assigned managed identity assigned to the flow log requires the Storage Blob Data Contributor role on the target storage account to authenticate and write raw data. For the Log Analytics workspace used by Traffic Analytics, the managed identity acts as the service principal for data ingestion and requires the Monitoring Contributor and Log Analytics Contributor roles at the subscription level. These roles ensure the identity has the necessary Microsoft.OperationalInsights/workspaces/* and Microsoft.Network/*/read permissions to process and store analyzed traffic data.

    Additionally, the Microsoft.Insights resource provider must be registered in the subscription for flow logging to function correctly. You should also ensure the managed identity has Microsoft.OperationalInsights/workspaces/read access to the specific workspace to facilitate secure ingestion.


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    Was this answer helpful?


Your answer

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