Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.4k views
in Technique[技术] by (71.8m points)

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

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.

enter image description here

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...