title: How do I get the username of the current user in a Flask app on an IIS server using Windows Authentication?
body: <p>I have a Flask app (Python 2.7) running on an IIS server in Windows 10. The server is configured to use Windows Authentication. I am using an HttpPlatformHandler in order to execute the Python code.  </p>
  
  <p>I have verified that the authentication is working and am able to see the Kerberos "Negotiate" auth header. However, I cannot find a way to access the username of the user who requested the page. </p>
  
  <p>I have tried printing the entire request header and request environment and it is not there. This <a href="https://stackoverflow.com/questions/31412852/flask-python-decoding-username-ntlm-or-negotiate-authentication-header">post</a> seems to be about my issue but the code in it is not correct. <strong>What can I do to pass the Windows username of the requester to my python code?</strong></p>
  
  <p>I would like to access the username of the user in order to both restrict page access by user and remove certain elements from pages based on user. </p>