title: Microsoft login via Oauth2 returns status code 200 instead of 302
body: <p>The Oauth2 authentication doesn't work when I follow the protocol programatically (python2 and requests). But it works properly when I use a browser. My purpose is to retrieve the authorisation code from the redirected url in order to generate an access token.</p>
  
  <p>Should I add something in the header to allow the redirection ? </p>
  
  <pre><code>import requests
  uri = https://login.microsoftonline.com/0000-0000-0000-0000/oauth2/authorize?response_type=codel&amp;client_id=0000-0000-0000-0000-0000&amp;response_mode=query&amp;resource=https%3A%2F%2Fwww.foo.com%2F&amp;redirect_uri=http%3A%2F%2Flocalhost:80%2F
  r = requests.get(uri)
  print r.url
  print r.status_code
  print r.history
  </code></pre>
  
  <p>The status code is <code>200</code> but I am expecting a <code>302</code> status and a result url like this: <code>localhost:80/?code=mycode&amp;state=mystate&amp;session_state=thesessionstate</code></p>
  
  <p>Best regards.</p>