Exchange Server with Auth0 timeoutlogout problem

Hello everyone,

We have Auth0 implemented in our Hybrid environment, it works good as SSO between O365 and OnPremise, but we have an issue in OnPremise when the Token expires.

What happens:

  1. We arrive on https://mail.xxx.com/owa (HAProxy)
  2. It redirects to our Exchange Server(s)
  3. Exchange is configured with AdfsAuthentication and using the URL of Auth0 BUT, when the Token is expired, Exchange redirects to internal Timeout/LogOff urls:
    a. /ecp/TimeoutLogout.aspx
    b. Redirects itself to /ecp/logoff.aspx
    c. NOW the issue (I think): https://mail.xxx.com/ecp/logoff.aspx is redirected to Auth0 for authentication, but this URL is not good, we dont want to log for /ecp/logoff.aspx, we wished for /owa/
    d. We end up back to https://mail.xxx.com/owa with a 500 error

[Get-OrganizationConfig | select AdfsIssuer > https: // auth.xxxx .com/wsfed/y----------------------------------------

After that timeout, it is good, we can log without issues.

Any one has any clues or ideas?

Thanks