API to get Azure IP Ranges and Service Tags?

Dan Jones 6 Reputation points
2020-09-23T17:57:10.497+00:00

Microsoft supports a JSON download of Azure IP Ranges and Service Tags to support adding to an Allowed List. The download is here: https://www.microsoft.com/en-us/download/details.aspx?id=56519

The pages says the list will be updated weekly. I don't want to manually check back each week. Is there a public API that provides the updated list?

Thanks!

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,025 questions
{count} vote

2 answers

Sort by: Most helpful
  1. MayankBargali-MSFT 66,996 Reputation points
    2020-09-24T04:35:21.733+00:00

    @Dan Jones Unfortunately there is no API that provides the updated list and the same feedback is provided in feedback page.

    For now you can automate this by calling this URL from your REST client and traverse to get the actual download URL as this download URL will change if there is new json file uploaded. Researching found this stackoverflow article which can help you. You need to test it and change it according to your needs.

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

    2 people found this answer helpful.
    0 comments No comments

  2. Dan Jones 6 Reputation points
    2020-09-24T14:07:52.347+00:00

    Mayank,

    Thank your for your response. We came across the following:

    https://learn.microsoft.com/en-us/azure/virtual-network/service-tags-overview#service-tags-on-premises
    https://learn.microsoft.com/en-us/rest/api/virtualnetwork/servicetags/list

    It seems this provides the same information as the download.