title: Getting a CODE back from OWIN Authentication Flow
body: <p>We use OWIN middleware to log people in to our cloud application using OpenId Connect.</p>
  
  <p>The issue is, we also want to access their Office 365 data through the new APIs.</p>
  
  <p>Using OWIN to log in doesn't return us to our website with a CODE, and so using ADAL we send them right back to consent a second time and then get our tokens, etc...</p>
  
  <p>Can we do this in one swoop?</p>
  
  <p>Here is what Fiddler says OWIN uses to authenticate:</p>
  
  <p><code>https://login.windows.net/common/oauth2/
  authorize?
  client_id=ourguid
  &amp;nonce=random characters
  &amp;response_mode=form_post
  &amp;response_type=code+id_token
  &amp;scope=openid+profile
  &amp;state=OpenIdConnect.AuthenticationProperties*more random characters*
  &amp;redirect_uri=http%3a%2f%2flocalhost%3a8683
  &amp;post_logout_redirect_uri=http%3a%2f%2flocalhost%3a8683</code></p>
  
  <p>I see code+id_token in the Query String, but when it sends me back there is nothing in the URL at all.</p>