Alternate method to resolve the VirtualNetwork service tag

Shaked Eyal 86 Reputation points
2025-03-05T13:27:50.0366667+00:00

Hello,

We are attempting to dynamically resolve the Virtual Network Service Tag in the Network Security Group rules.

We desire to comprehend the IP addresses that this service tag encompasses for each Virtual Network within our subscription.

We have identified the option to obtain this information via the Network Watch - Effective Security Rule API.

Is there an alternative method to acquire this information? Are there any REST APIs or a series of APIs that we could utilize to collect this data?

Not all of our clients are willing to enable the Network Watcher solely for this purpose.

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.
2,663 questions
{count} votes

Accepted answer
  1. Praveen Bandaru 850 Reputation points Microsoft External Staff
    2025-03-07T13:20:28.1333333+00:00

    Hello Shaked Eyal

    Greetings!

    In an inbound NSG rule, the source virtual network service tag includes peered VNET IP ranges, while the destination virtual network service tag includes current VNET IP ranges.

    For an outbound NSG rule, the source virtual network service tag includes current VNET IP ranges, and the destination virtual network service tag includes peered VNET IP ranges.

    And also check the below link to find the IP ranges for service tag:

    Azure IP Ranges and Service Tags

    Regarding your API management to fetch the IP ranges, please check the link below for more information:

    https://learn.microsoft.com/en-us/answers/questions/105211/api-to-get-azure-ip-ranges-and-service-tags


    Hope the above answer helps! Please let us know do you have any further queries.

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


0 additional answers

Sort by: Most helpful

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.