问题描述
我正在尝试使用Django Microsoft 身份验证后端"在我的 Django 项目中允许 o365 登录 (
对于重定向URL,应该以https
开头,如果需要以http开头,必须配置为http://localhost
.
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
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
.
这篇关于AADSTS50011:请求中指定的回复 URL 与为应用程序配置的回复 URL 不匹配:'******-*****-*****-*****-*********'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!