CORS issue while using APP throught Azure Proxy after an hour (AppProxyAccessCookie)

Dylan James 46 Reputation points
2020-08-10T14:16:28.16+00:00

tl;dr - The application gives a CORS error after an hour if page is left idle.

We have an internal app that is accessible to the external network using Azure App Proxy, the application uses Azure MSAL (OpenID connect)for AD and MFA authentication.
We are using MSAL to get token and refresh it every 50mins (Since the token gets expired after an hour).
The application stores AzureAppProxyAccessCookie that disappears after an hour which is causing the CORS error for the resource request.

Wanted to know how i could update the AccessCookie stored in the browser so that the browser doesn't throw CORS error. Looked through a lot of docs, but couldn't figure it out, would appreciate some help from this community.

I have referred these docs:
cors
application-proxy-configure-native-client-application
active-directory-configurable-token-lifetimes
application-proxy-configure-cookie-settings

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
23,215 questions
{count} votes

Accepted answer
  1. Alfredo Revilla - Upwork Top Talent | IAM SWE SWA 27,491 Reputation points
    2020-09-07T15:18:31.027+00:00

    https://login.microsoftonline.com/{tenant}/oauth2/authorize does not support CORS. The work around is to Extend the lifetime of the access token.

    --
    Please let us know if this answer was helpful to you. If so, please remember to mark it as the answer so that others in the community with similar questions can more easily find a solution.

    3 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Hargitai Tamas 0 Reputation points
    2024-04-01T19:47:45.63+00:00

    Hi All,

    have you ever resolved this issue? The same thing happening to our application now. What is the reason and how to solve this problem can anyone help me? Truly appreciated.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.