Answer accepted by question author
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
- Create (or use an existing) user-assigned managed identity.
- Assign Storage Blob Data Contributor to it on your target Storage Account.
- 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.
-
Roos, Fabian 25 Reputation points
Hello @Ravi Varma Mudduluru
Thank you for clarifying the required permissions. I was wondering why the managed identity doesn't need any permissions on the Log Analytics workspace, but your explanation makes it more clear.
We will set up the identity and permissions as described.
Sign in to comment
