I'm working on a simple benchmark script that requires information provided by https://outlook.office365.com/autodiscover/autodiscover.xml. I am using basic authentication with my outlook.com email credentials and it works fine when testing from my computer.
When I shared the script with my colleague (using the same credentials) he was getting a 403 Forbidden
response for the request. After some trial and error, it seems like the script is working from multiple different networks inside my country but as soon as I run it from a different country, I get the 403 Forbidden
. Since this is a benchmark script it is essential I use the same credentials.
I cannot get any information as to what might cause the issue, given that the script is always the same, I suspect this could be a security feature preventing a user to authenticate from different countries, but I was unable to find any documentation or even mention of it.
Does anyone have an idea what might be causing the 403?
fetch(url, { method: "POST", headers: { "Content-Type": "text/xml; charset=utf-8", "Accept": "*/*", "Authorization": "Basic <<BASE-64 ENCODED U:P>>", "X-User-Identity": "<<USER-EMAIL>>, "User-Agent": "MacOutlook/16.37.20051002 (Intelx64 Mac OS X Version 10.15.3 (Build 19D76))" }, body: "<<XML-PAYLOAD>>"
I've also tried my browser and curl User-Agent strings to no avail. – Usm