Fixed by
1) passing in a user agent with the URL
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36
2) parsing the redirection url with regex and successfully downloading the azure ip range json file.
Fixed by 1) passing in a user agent with the URL
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36
2) parsing the redirection url with regex and successfully downloading the azure ip range json file.