[Azure] Flow logging for network security groups

Giang Nguyễn Trọng 20 Reputation points
2025-08-21T14:39:26.64+00:00

Hello,

As far as I know,

"Network security group (NSG) flow logs will be retired on September 30, 2027. After June 30, 2025, you'll no longer be able to create new NSG flow logs. We recommend migrating to virtual network flow logs, which address the limitations of NSG flow logs."

When using Virtual Network Flow Logs, how can we check the allow/deny log of a single NSG inside the Virtual Network?

Looking forward to receiving your help.

Thank you so much!

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
{count} votes

1 answer

Sort by: Most helpful
  1. G Sree Vidya 4,250 Reputation points Microsoft External Staff Moderator
    2025-08-21T22:47:16.1333333+00:00

    Hello Giang Nguyễn Trọng

    It looks like you're looking to check the allow/deny logs for a specific Network Security Group (NSG) within the Virtual Network Flow Logs after migrating from NSG Flow Logs.

    Please check the below details:

    1.Make sure you have Virtual Network Flow Logs enabled for your Azure Virtual Network. This setup is essential since NSG Flow Logs will be retired in 2027, and you will need to migrate to Virtual Network Flow Logs for logging.

    2.You can also use NSG Diagnostics to simulate traffic and see which rule allows or denies it:

    • Go to Network Watcher > NSG Diagnostics.
    • Select the target VM or subnet, protocol, direction, and source/destination IP.
    • Run diagnostics to see which NSG rule is applied and whether traffic is allowed or denied.
    • Use tools like Azure Log Analytics or storage account CA to query and analyze these logs. You can create queries that filter by the NSG you are interested in.

    Refer: https://learn.microsoft.com/en-us/azure/network-watcher/vnet-flow-logs-manage?tabs=portal

    https://learn.microsoft.com/en-us/azure/network-watcher/vnet-flow-logs-overview?tabs=Americas


    I hope it helps! Please let us know do you have any further queries.

    Please do not forget to “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.
    0 comments No comments

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.