Forum Discussion
jcloudtech
Aug 07, 2024Copper Contributor
Azure Web App Easy Auth using Reverse Proxy
My organization manages one single endpoint which must be used to expose web application; e.g. https://contoso.com/app_one/ We deployed an app in az web apps with Azure AD Easy Auth. (not ac...
Kidd_Ip
Jan 03, 2025MVP
Try this:
- Update the Redirect URI: Ensure that the redirect URI in your Azure AD app registration matches the public endpoint. This means updating the redirect URI to https://contoso.com/app-one/.auth/login/aad/callback.
- Configure Azure AD Authentication: In the Azure portal, navigate to your Azure Web App and go to the Authentication/Authorization settings. Ensure that the redirect URI is set to your public endpoint.
- Modify the Reverse Proxy Configuration: Since you're using Azure API Management (APIM) as a reverse proxy, you need to ensure that APIM is correctly forwarding the requests and responses. You might need to rewrite the location headers in the responses to ensure they point to the public endpoint. This can be done using policies in APIM.
- Custom Domain and SSL: Make sure your custom domain (contoso.com) is properly configured in Azure Web App and that you have an SSL certificate set up for secure communication.
- Host Header: Ensure that the host header is preserved when the request is forwarded from APIM to the Azure Web App. This can be done by setting the preserveHostHeader attribute to true in your APIM policy.