为了账号安全,请及时绑定邮箱和手机立即绑定

AADSTS50011:请求中指定的回复 URL 与为应用程序配置的回复 URL 不匹配:

AADSTS50011:请求中指定的回复 URL 与为应用程序配置的回复 URL 不匹配:

慕后森 2022-06-16 16:45:32
我msal用来验证用户。我的userAgentApplication样子是这样的:var userAgentApplication = new UserAgentApplication({  auth: {    clientId: config.appId,    authority: config.authority,    validateAuthority: false,  },  cache: {    cacheLocation: "localStorage",    storeAuthStateInCookie: true,  },});这是我的config.jsmodules.exports = {    appId: "<my-App-id>",    authority:      "https://login.microsoftonline.com/<my-Tenant-id>/",    scopes: ["user.read", "calendars.read"],  };我一直遇到这个错误,我不知道为什么会这样。Request Id: 38b5b62e-0407-4520-8319-157b9c2e3e00Correlation Id: 143c20c5-4cab-41be-aded-14daa783d022Timestamp: 2020-04-06T07:21:35ZMessage: AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application: 'xxxxxxxxxx'.
查看完整描述

2 回答

?
哆啦的时光机

TA贡献1779条经验 获得超6个赞

auth.redirectUri实例化时如果不设置UserAgentApplication,每次请求msal都会使用当前页面的url作为设置,使用的页面都必须在Azure Portal中注册。您需要设置为在 Azure 门户中注册的 url,或者将应用程序中的所有页面注册为可能的重定向 uri(可能不太可取)。redirectUriredirectUriauth.redirectUri



查看完整回答
反对 回复 2022-06-16
?
倚天杖

TA贡献1828条经验 获得超3个赞

这是一个愚蠢的错误。就我而言,我允许 App Service 接受 http 和 https 请求。

这是 http 请求,因此它与回调 URL 不匹配。我基本上只是从 Azure 门户中的应用服务设置中禁用了 http 请求,以确保所有传入请求都是 https。


查看完整回答
反对 回复 2022-06-16
  • 2 回答
  • 0 关注
  • 652 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号