Thank you for reaching out.
I understand you are facing issue due incorrect domain name in authorization cookies.
The broken cookies issue due to use of Reverse proxy is documented here
Based on your set-up here
- The browser sends a request for
accounts.contoso.com
to the reverse proxy. - The reverse proxy rewrites the host name to be
contoso.backend.net
in the request to the back-end web application (or to a similar default domain for another service). - The application generates a cookie that uses a domain based on the incoming
contoso.backend.net
host name. The browser stores the cookie for this specific domain rather than theaccounts.contoso.com
domain that the user is actually using. - The browser doesn't include the cookie on any subsequent request for
accounts.contoso.com
because the cookie'scontoso.backend.net
domain doesn't match the domain of the request.
The resolution here as correctly identified will be upgrade Classic AFD to Standard SKU. As If you use Azure Front Door Standard or Premium, you can preserve the host name by leaving the origin host header blank in the origin definition. This way the Azure Front Door will not rewrite the hostname and will send it as accounts.contoso.com
to the backend.
Hope this helps! Please let me know if the issue was resolved or it still persists. Thank you!