We have a hybrid AD environment with SSO. Everything works fine when signing into the azure portal when the user is on the domain network. When the user tries to sign in to the portal and they're not in the domain we get a 404 error. I have discovered that the firewall/router is supplying a different SSL certificate which is causing the 404 error. I can't seem to figure out how to stop this from occurring.
I have provided two different screenshots showing what I'm referring to.