I managed to setup windows authentication for my flask application with IIS 8.5. (Flask app runs frontend angular and also the api's needed by it). Everything works fine when i access the machine using the ip address and the port ie. the browser asks for a username and password prompt and api's work fine after authentication. But when I use the computersname.domain to access the page, there is no authentication and I'm automatically redirected(which I understand is auto-login because the requesting machine and the server are in the same domain).
The main problem is that when I use IP address to access the api's I was able to capture the username of the logged-on user using the flask variable request.environ['REMOTE_USER']. But when the computername and domain is used, I am not able to capture the username. How do I capture it?