我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
倚天杖
TA贡献1828条经验 获得超3个赞
这是一个愚蠢的错误。就我而言,我允许 App Service 接受 http 和 https 请求。
这是 http 请求,因此它与回调 URL 不匹配。我基本上只是从 Azure 门户中的应用服务设置中禁用了 http 请求,以确保所有传入请求都是 https。
添加回答
举报
0/150
提交
取消
