Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.
From your verbatim,
- Your App service is : "contoso.azurewebsites.net"
- You are using App gateway as reverse proxy to access this.
- You have a custom domain "contoso1.com" that is pointing to the App gw.
- You are using Easy Auth
- And the callback URL is using "contoso1.com"
- And also, you have added the custom domain "contoso1.com" to the app service as well.
Your requirement,
- You would like to use the same app service "contoso.azurewebsites.net" for another domain "contoso2.com" via App gateway.
Analysis :
Is there any specific reason you are doing this instead of redirecting users to the original site?
- i.e., Give a 3XX response to "contoso2.com"
- and Redirect users to "contoso1.com"
The challenges I am seeing with your set up are
#1
You are using App Service Entra authentication.
- I believe the call back URL is configured with "contoso1.com"
- So when users are accessing the "contoso2.com", and during authentication, there is a possibility that they get redirected to "contoso1.com" from Entra
#2
- Also, you must generate App gateway certificates.
Instead,
- I would suggest you consider redirecting users to the original site "contoso1.com".
- Consider Listener redirection
- And redirect users from "contoso2.com" to "contoso1.com"
Without Authentication, your action plan should work.
Kindly let us know if this helps or you need further assistance on this issue.
Thanks,
Kapil