SSO behind Azure Application Gateway
s
I have set up Microsoft Entra ID for backoffice authentication and it runs fine when I add my custom domain directly on my App Service in Azure. As soon as I move the domain to the Application Gateway and the traffic is directed via that to the app service it starts to fail. When clicking the login button on the backoffice login screen I am directed to the Microsoft login screen and after login I am redirected to the app service domain
*.azurewebsites.net/umbraco-microsoft-signin/
which returns
HTTP ERROR 500
. Looking in the logs, I see the following error:
.AspNetCore.Correlation.yGmof0bptm3hkHcu_mq-QuaSyPpfUkEPOmFPFbX6qjg
To fix the issue, I have tried to add a rewrite rule set in the application gateway as described in this article: https://medium.com/objectsharp/azure-application-gateway-http-headers-rewrite-rules-for-app-service-with-aad-authentication-b1092a58b60 That fixes the redirect issue, and I am sent back to the domain defined in the application gateway but I am still presented with
HTTP ERROR 500
when redirectred back to
custom.tld/umbraco-microsoft-signin/
. In the log I am getting this error: https://pastebin.com/ML5Z2FQj I am not sure on how to fix this and if I need to add some configuration in my external login provider in Umbraco or tweak some settings in Azure. I appreciate any input you can provide 🤓 https://cdn.discordapp.com/attachments/1230780262288199701/1230780262489784330/chrome_M4WGdbUxWa.png?ex=66349071&is=66221b71&hm=9dbfbcba8cf2ca7d9235b24ac8f9d0f8bca17e501f98b4484a852cca21888fae& https://cdn.discordapp.com/attachments/1230780262288199701/1230780262938443837/chrome_nSfQ2ps9LN.png?ex=66349071&is=66221b71&hm=0ca283b574a64f7cbd7b31585f207574385561302591cf7a9b8ee06375aee640&
245 Views