Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Configure Azure AD redirect url with wild card


Hi guys,

I got problem when using AAD to login after certain minutes, when login session is timeout EPiServer will redirect to Microsoft login page with current page url of user for AAD to redirect after login. If current page url is not as same as defined Redirect url in AAD, Microsoft login page will display message “AADSTS50011: The reply url specified in the request does not match the reply urls configured for the application”.

Is there any workaround this issue?

I use EPiServer 11.12

Edited, Jun 25, 2019 8:26

I would first try to add returnurl as querystring parameter (but use the same reply url). Then you can bounce the user to the correct url after they are logged in. 

Alternatively use a cookie on user to store the return url. 

It's normally a good idea to have one single reply url. It makes it easier to extend the login if needed later. 

Jun 25, 2019 9:50
Linh Le - Jun 26, 2019 12:21
Thank for reply. Could specify more detail how to implement it? It'would great if you can share sample code.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.