title: Retrieve Access Token within a AAD secured Azure Web App
body: <p>I have an Angular4 Application hosted in an Azure Web App and a .NET core Web API hosted in an Azure API App. </p>
  
  <p>The API is secured with Azure Active Directory. Currently I use ng2-adal to aquire an access token which I inject to the headers to perform my API calls.</p>
  
  <p>Now I try to remove the ng2-adal module and secure my Web App with the <strong>Authentication / Authorization</strong> feature using the <em>same</em> ClientId (like the API). When I browse to my website I get redirected to the AAD login and after I successfully login, I get redirected to my site. Now I wan't to call the API (that is secured with the same ClientId) within my Web App but can't find a way to retrieve the token. </p>
  
  <p>Is there a way to <strong>retrieve the access token within my Angular App</strong> in this scenario?
  It looks like the token is stored encrypted within the AppServiceAuthSession Cookie:</p>
  
  <p><a href="https://i.stack.imgur.com/eZJwh.png" rel="noreferrer"><img src="https://i.stack.imgur.com/eZJwh.png" alt="enter image description here"></a></p>