Does your Azure AD application require a fully qualified path for the response url?

I see something strange that I have not encountered before. I have a web app and I am redirecting in this Azure AD web app to get a code that I can exchange for an access token. I've done this many times, so I just reuse the same code. I created my application registration in Azure as I have done many times. The problem is - usually I can just specify the hostname for the response url in the app config and then Azure AD redirects fine anywhere in that host.

For example, if I want to redirect to https: // foo / users / processcode , I can usually just put the ReplyUrl from https: // foo and everything works fine. In this case, it says: " https: // foo / users / processcode 'does not match the response addresses configured for the blah application." If I supply the full path for ReplyUrl then it works, but for a variety of reasons that are outside the scope of this area, I don't want to.

So I don't understand why there might be a problem in this case. Wondering if anyone has seen or knows why this could be a problem all of a sudden.

Thank.

+3


source to share


1 answer


The redirect / response url must match the exact page you want to redirect to. You can add multiple redirect URLs to your app registration information if you want to redirect to different pages of your website - or your webpage can do a redirect for you.



Another option is to add * to the redirect url ( https://mywebsite.com/* ), but this only works with non-converted apps.

+2


source







All Articles