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

China☆狼群 提交于 2021-01-13 10:37:50

问题


I am trying to allow o365 login in my Django project using "Django Microsoft Authentication Backend (https://django-microsoft-auth.readthedocs.io/en/latest/)" but I keep getting this error when i try to log in with my microsoft credentials.

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

I have checked the links i added to my django project and in AAD but cannot figure out the problem

PS: i am doing testing on my local host i.e. localhost:8000

my redirect URI in AAD is :

http://localhost:8000/microsoft/auth-callback/

and i have set DEBUG = TRUE

In addition, i have chosen allow accounts in any organizational directory (multi-tenant) login option


回答1:


There is a general solution to the problem of not match:

When you visit the application url , you will be redirected to the login page. Decode the authorization request URL, you will find redirect_uri, copy the value of redirect_uri and paste it into the azure portal, and try again.

For the redirect URL, it should start with https, if you need to start with http, you must configure it as http://localhost.




回答2:


Use Fiddler to capture the authorization request and find what is the actual value of the redirect_uri parameter being sent.



来源:https://stackoverflow.com/questions/63776175/aadsts50011-the-reply-url-specified-in-the-request-does-not-match-the-reply-url

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!