Best way to get MS hosted agents ip ranges

Hello everyone! I’m looking for a clean way to fetch ms hosted agents ip ranges. I know that it is available on weekly jsons at https://download.microsoft.com/download/7/1/D/71D86715-5596-4529-9B13-DA13A5DE5B63/ServiceTags_Public_20220704.json but that doesn’t seem to be a very reliable url for automation purposes. Does anyone know if I can get this json from a more reliable source?

Thanks in advance!!

This is the primary source. Any other source is going to be unofficial and thus not reliable.

If you have IP restriction requirements use self-hosted agents.

What you’re currently doing is not only whitelisting the IP range for (ALL) ms hosted agents but you’re whitelisting the whole of your azure geography. At that point what is even the point of IP whitelisting? Anyone could create a VM in your geography and access your resources.

Make sense haha. I thought I was whitelisting microsoft hosted agents only, if it is any VM than it makes no sense. And even if it was only ms hosted agents, Iguess it would still be bad, maybe not that bad, but bad. Thanks for the input guys. I’ll stick to self-hosted.