@amol Apologies for delay on this , the scenario you are in might be an expected one. This needs some configuration changes at the Application gateway level. You can go through this to figure out what you need : https://learn.microsoft.com/en-us/azure/application-gateway/rewrite-http-headers-url#modify-a-redirection-url
This Set-Cookie was blocked because its Domain attribute is invalid with regards to the current host URL

In my application, I have Azure AD authentication OpenId connect authentication scheme, and my app is running behind the application gateway. I am facing an issue while authenticating from the application gateway URL which is public and my backend application URL is restricted for public use. For ex. this is my application gateway URL example.com and this is for backend application example.azurewebsites.net.
When I hit the example.com URL in the browser I redirected to the Microsoft site for the login then I log in after successful login I am redirected to the example.com/sign-oidc URL, and that's where the problem starts. When I saw the response header of the example.com/sign-oidc in the network tab of the browser, I got this warning message "This Set-Cookie was blocked because its Domain attribute is invalid with regards to the current host URL" for the Set-Cookie header, its domain attribute was set to example.azurewebsites.net. I think this should be the application gateway's URL which is example.com.
This issue preventing me to log into the system.
Many thanks,
2 answers
Sort by: Most helpful
-
Mahesh Patil 0 Reputation points
2023-01-12T11:28:40.81+00:00 I tried the solution provided in link. after implementation now URL is not changing but getting below error: