title: AADSTS90019: No tenant-identifying information found in either the request or implied by any provided credentials
body: <p>Hi i want to implement the Office365 SSO login.
  I've created an account and following now this documentation: <a href="https://msdn.microsoft.com/en-us/library/azure/dn645542.aspx" rel="noreferrer">https://msdn.microsoft.com/en-us/library/azure/dn645542.aspx</a></p>
  
  <p>I'm at the point where i got the code and now want to implement "Use the Authorization Code to Request an Access Token"</p>
  
  <p>But i get an error: <strong>AADSTS90019: No tenant-identifying information found in either the request or implied by any provided credentials.</strong></p>
  
  <p>Here is an detailed log of my call:</p>
  
  <pre><code>http-bio-8080-exec-10 29/06/2015 14:45:37,496 | DEBUG | org.apache.http.wire | wire | http-outgoing-3 &gt;&gt; "POST /common/oauth2/token HTTP/1.1[\r][\n]"
  http-bio-8080-exec-10 29/06/2015 14:45:37,496 | DEBUG | org.apache.http.wire | wire | http-outgoing-3 &gt;&gt; "Content-Length: 810[\r][\n]"
  http-bio-8080-exec-10 29/06/2015 14:45:37,497 | DEBUG | org.apache.http.wire | wire | http-outgoing-3 &gt;&gt; "Content-Type: application/x-www-form-urlencoded[\r][\n]"
  http-bio-8080-exec-10 29/06/2015 14:45:37,497 | DEBUG | org.apache.http.wire | wire | http-outgoing-3 &gt;&gt; "Host: login.microsoftonline.com[\r][\n]"
  http-bio-8080-exec-10 29/06/2015 14:45:37,498 | DEBUG | org.apache.http.wire | wire | http-outgoing-3 &gt;&gt; "Connection: Keep-Alive[\r][\n]"
  http-bio-8080-exec-10 29/06/2015 14:45:37,499 | DEBUG | org.apache.http.wire | wire | http-outgoing-3 &gt;&gt; "User-Agent: Apache-HttpClient/4.3.5 (java 1.5)[\r][\n]"
  http-bio-8080-exec-10 29/06/2015 14:45:37,499 | DEBUG | org.apache.http.wire | wire | http-outgoing-3 &gt;&gt; "Accept-Encoding: gzip,deflate[\r][\n]"
  http-bio-8080-exec-10 29/06/2015 14:45:37,500 | DEBUG | org.apache.http.wire | wire | http-outgoing-3 &gt;&gt; "[\r][\n]"
  http-bio-8080-exec-10 29/06/2015 14:45:37,501 | DEBUG | org.apache.http.wire | wire | http-outgoing-3 &gt;&gt; "client_id=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;redirect_uri=http%3A%2F%2Flocalhost%3A8080%2FXXXXXXXXX%2FREST%2FUser%2Foffice&amp;client_secret=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&amp;code=XXXXXXXXXXXXXXXXXXX&amp;grant_type=authorization_code"
  http-bio-8080-exec-10 29/06/2015 14:45:37,570 | DEBUG | org.apache.http.wire | wire | http-outgoing-3 &lt;&lt; "H"
  http-bio-8080-exec-10 29/06/2015 14:45:37,571 | DEBUG | org.apache.http.wire | wire | http-outgoing-3 &lt;&lt; "TTP/1.1 400 Bad Request[\r][\n]"
  http-bio-8080-exec-10 29/06/2015 14:45:37,572 | DEBUG | org.apache.http.wire | wire | http-outgoing-3 &lt;&lt; "Cache-Control: no-cache, no-store[\r][\n]"
  http-bio-8080-exec-10 29/06/2015 14:45:37,572 | DEBUG | org.apache.http.wire | wire | http-outgoing-3 &lt;&lt; "Pragma: no-cache[\r][\n]"
  http-bio-8080-exec-10 29/06/2015 14:45:37,573 | DEBUG | org.apache.http.wire | wire | http-outgoing-3 &lt;&lt; "Content-Type: application/json; charset=utf-8[\r][\n]"
  http-bio-8080-exec-10 29/06/2015 14:45:37,573 | DEBUG | org.apache.http.wire | wire | http-outgoing-3 &lt;&lt; "Expires: -1[\r][\n]"
  http-bio-8080-exec-10 29/06/2015 14:45:37,574 | DEBUG | org.apache.http.wire | wire | http-outgoing-3 &lt;&lt; "Server: Microsoft-IIS/8.5[\r][\n]"
  http-bio-8080-exec-10 29/06/2015 14:45:37,575 | DEBUG | org.apache.http.wire | wire | http-outgoing-3 &lt;&lt; "x-ms-request-id: c7702631-895c-4c6c-bad1-691ced9259f5[\r][\n]"
  http-bio-8080-exec-10 29/06/2015 14:45:37,575 | DEBUG | org.apache.http.wire | wire | http-outgoing-3 &lt;&lt; "x-ms-gateway-service-instanceid: ESTSFE_IN_3[\r][\n]"
  http-bio-8080-exec-10 29/06/2015 14:45:37,576 | DEBUG | org.apache.http.wire | wire | http-outgoing-3 &lt;&lt; "X-Content-Type-Options: nosniff[\r][\n]"
  http-bio-8080-exec-10 29/06/2015 14:45:37,576 | DEBUG | org.apache.http.wire | wire | http-outgoing-3 &lt;&lt; "Strict-Transport-Security: max-age=31536000; includeSubDomains[\r][\n]"
  http-bio-8080-exec-10 29/06/2015 14:45:37,577 | DEBUG | org.apache.http.wire | wire | http-outgoing-3 &lt;&lt; "P3P: CP="DSP CUR OTPi IND OTRi ONL FIN"[\r][\n]"
  http-bio-8080-exec-10 29/06/2015 14:45:37,578 | DEBUG | org.apache.http.wire | wire | http-outgoing-3 &lt;&lt; "Set-Cookie: flight-uxoptin=true; path=/; secure; HttpOnly[\r][\n]"
  http-bio-8080-exec-10 29/06/2015 14:45:37,578 | DEBUG | org.apache.http.wire | wire | http-outgoing-3 &lt;&lt; "Set-Cookie: x-ms-gateway-slice=productiona; path=/; secure; HttpOnly[\r][\n]"
  http-bio-8080-exec-10 29/06/2015 14:45:37,579 | DEBUG | org.apache.http.wire | wire | http-outgoing-3 &lt;&lt; "Set-Cookie: stsservicecookie=ests; path=/; secure; HttpOnly[\r][\n]"
  http-bio-8080-exec-10 29/06/2015 14:45:37,580 | DEBUG | org.apache.http.wire | wire | http-outgoing-3 &lt;&lt; "X-Powered-By: ASP.NET[\r][\n]"
  http-bio-8080-exec-10 29/06/2015 14:45:37,580 | DEBUG | org.apache.http.wire | wire | http-outgoing-3 &lt;&lt; "Date: Mon, 29 Jun 2015 12:45:48 GMT[\r][\n]"
  http-bio-8080-exec-10 29/06/2015 14:45:37,581 | DEBUG | org.apache.http.wire | wire | http-outgoing-3 &lt;&lt; "Content-Length: 501[\r][\n]"
  http-bio-8080-exec-10 29/06/2015 14:45:37,581 | DEBUG | org.apache.http.wire | wire | http-outgoing-3 &lt;&lt; "[\r][\n]"
  http-bio-8080-exec-10 29/06/2015 14:45:37,582 | DEBUG | org.apache.http.wire | wire | http-outgoing-3 &lt;&lt; "{"error":"invalid_request","error_description":"AADSTS90019: No tenant-identifying information found in either the request or implied by any provided credentials.\r\nTrace ID: c7702631-895c-4c6c-bad1-691ced9259f5\r\nCorrelation ID: bd641f9d-9982-4808-b7ba-95d3dc0ba8d9\r\nTimestamp: 2015-06-29 12:45:49Z","error_codes":[90019],"timestamp":"2015-06-29 12:45:49Z","trace_id":"c7702631-895c-4c6c-bad1-691ced9259f5","correlation_id":"bd641f9d-9982-4808-b7ba-95d3dc0ba8d9","submit_url":null,"context":null}"
  </code></pre>
  
  <p>This is how i configured the APP</p>
  
  <p><img src="https://i.stack.imgur.com/eDvPN.png" alt="enter image description here"></p>