简体   繁体   中英

Redirect URL with http but NOT 'localhost' value in app registration microsoft azure

When trying to access azure application using my local app it always give me an error saying The reply URL specified in the request does not match the reply URLs configured for the application . I understood that the url( http://mylocalapp.val/options/msgraph365 ) in my localhost doesn't match on one of the redirect ulrs I registered on azure.

Azure only allows 'localhost' value if we are going to use http. Now, this is I am stuck with. I have configure in my apache and hosts file to use http://mylocalapp.val when ever I open my local app. The redirect url in my.env is and should always be 'http://mylocalapp.val/options/msgraph365' but the problem is I can't register this URL in azure since it is using http but the domain name is not localhost , its mylocalapp.val . I have seen to some applications with this kind of setup and it works but I don't know how they did it.

It there a setup that I missed in azure to enable this kind of setup? Or what should I register in my redirect url? I have already tried http://localhost/options/msgraph365 and still no luck.

AADSTS50011 - The reply URL specified in the request does not match the reply URLs configured for the application

As you mentioned, this error usually occurs when there is a mismatch between the reply URLs defined in the Azure portal and the reply URL the application is providing to Azure AD.

Azure AD only accepts saved reply URLs which are already defined in Azure Portal. As you already know, Azure allows http protocol value for only localhost . Remaining all redirect URIs must begin with the scheme https . To use https, you should install SSL certificate .

  • If you are using localhost , check if you have redirect URI something like this -> http://localhost: portNumber/options/msgraph365 for deployed azure web app.
  • If not, try to change the reply URL type in manifest so that you can make use of https for which you need SSL certificate . Then change your redirect URI to something like this: https://mylocalapp.val/options/msgraph365

To change the reply URL in manifest , go through the steps below:

Go to Azure Portal -> Azure AD -> App Registrations -> Your App -> Select Manifest (Under Manage)

1个

For more information, go through the references below if they are helpful.

Reference:

Redirect URI (reply URL) restrictions - Microsoft identity platform | Microsoft Docs

Understanding the Azure Active Directory app manifest - Microsoft identity platform | Microsoft Docs

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM