title: Cookies getting excluded in case of API calls hosted as application within the same IIS site
body: <p>There is a asp.net webapp with angular frontend and asp.net web api2 backend. Here goes the URL details :</p>
  <pre><code>Web App: https://www.testapp.com
  Web API: https://www.testapp.com/services/api
  </code></pre>
  <p>Azure AD with OpenIDConnect (authorization code flow) <a href="https://docs.microsoft.com/en-us/azure/active-directory/develop/tutorial-v2-asp-webapp" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/active-directory/develop/tutorial-v2-asp-webapp</a> has been used to implement authentication.</p>
  <p>Since both web app and the web api are considered as single app in this case, hence there is only one registration done in Azure AD with Redirect URI : <a href="https://www.testapp.com" rel="nofollow noreferrer">https://www.testapp.com</a></p>
  <p>Is is possible that cookies generated as part of Azure AD login flow for the Redirect URI: <a href="https://www.testapp.com" rel="nofollow noreferrer">https://www.testapp.com</a> gets excluded whenever there is a call made to the web api: <a href="https://www.testapp.com/services/api" rel="nofollow noreferrer">https://www.testapp.com/services/api</a></p>
  <p>When I navigate to the URL:<a href="https://www.testapp.com" rel="nofollow noreferrer">https://www.testapp.com</a> using browser, in that case Azure AD login flow gets triggered but now if I try to navigate to the URL: <a href="https://www.testapp.com/services/api/test/method" rel="nofollow noreferrer">https://www.testapp.com/services/api/test/method</a> I don't see the Azure AD login flow getting triggered.</p>
  <p>Can anyone help me here how to fix this issue.</p>