title: XMLHttpRequest Error Refreshing Access Token from Azure AD
body: <p>We followed <a href="https://github.com/AzureADSamples/WebApp-RoleClaims-DotNet" rel="nofollow noreferrer">this</a> project and wired up our MVC application to use the new ADAL bit but we are seeing the following error when the token expires:</p>
  
  <blockquote>
    <p>XMLHttpRequest cannot load <a href="https://login.windows.net/0bccafdb-3696-4344-3269-991d0a93be57/oauth2/autho" rel="nofollow noreferrer">https://login.windows.net/0bccafdb-3696-4344-3269-991d0a93be57/oauth2/autho</a>…QzLTk5MWUtOGE5KRLTIFMYWE3MTliNjU1YMJTLENi00YWIzLTllNDQtYmVmZWU4ZWFjMjQ1. The request was redirected to '<a href="https://login.microsoftonline.com/login.srf?wa=wsignin1.0&amp;wtrealm=https%3a%" rel="nofollow noreferrer">https://login.microsoftonline.com/login.srf?wa=wsignin1.0&amp;wtrealm=https%3a%</a>…ZAEkNmNhNzFiYTUtZWZhOS00YjE0LWExYTYtZjQ5NjgwMzU5NzEz7Q2&amp;wp=MBI_FED_SSL&amp;id=', which is disallowed for cross-origin requests that require preflight.</p>
  </blockquote>
  
  <p>Related: <a href="https://stackoverflow.com/questions/28097648/cors-preflight-request-responds-with-302-redirect-in-azure-hosted-web-api">CORS preflight request responds with 302 redirect in Azure hosted Web API</a></p>