title: AADSTS50058 when calling AAD causes refresh loops
body: <p>sometimes i'm getting error AADSTS50058 when calling Azure Active Directory Graph API from Angular.</p>
  
  <p>my setup : </p>
  
  <ul><li>adal-angular 1.0.13</li>
  <li>angular v1.5.8</li>
  <li>google chrome with no flag on 'Block 3rd party cookies'</li>
  <li>tried with KMSI flag on</li>
  <li>no extensions that block cookies on Chrome (latest)</li>
  <li><b>update</b> : route package "angular-route"</li>
  </ul>
  
  <p>this is the code:</p>
  
  <pre><code>var my_endpoints = {
      'https ://graph.windows.net/': 'https ://graph.windows.net/'
  };
  
  adalProvider.init({
      instance: 'https ://login.microsoftonline.com/',
      tenant: "common",
      clientId: '[my-client-ID-here]',
      extraQueryParameter: 'nux=1',
      cacheLocation: 'sessionStorage',
      endpoints: my_endpoints 
  }, $httpProvider);
  </code></pre>
  
  <p>n.b.: https links are without space, i set this because of stackoverflow.</p>
  
  <p>this is the error i can't resolve : 
  error AADSTS50058: A silent sign-in request was sent but no user is signed in. The cookies used to represent the user's session were not sent in the request to Azure AD. This can happen if the user is using Internet Explorer or Edge, and the web app sending the silent sign-in request is in different IE security zone than the Azure AD endpoint (login.microsoftonline.com).</p>
  
  <p>tried to disconnect and re-login but no success</p>
  
  <p>the awkward thing i can't figure out is that it often works, then sometimes it raises this error, keeping the page in reload loop.
  if i erase the AAD calls it works as expected.</p>
  
  <p>is this because i have to manage 2 tokens, one with the API and one with AAD GraphAPI?</p>
  
  <p>if yes, how can i manage this ?</p>
  
  <p>any help is highly appreciated</p>