【发布时间】:2021-03-17 17:37:06
【问题描述】:
我为 Web 应用程序 (NodeJs) 下载了示例代码 from here,并将配置参数替换为我的应用程序的值。像这样:
const config = {
auth: {
clientId: "12345678901234567890",
authority: "https://login.microsoftonline.com/09876543210987654321",
clientSecret: "*****************",
knownAuthorities: ["https://login.microsoftonline.com/09876543210987654321"
]
},
当我运行应用程序时,我得到以下信息:
[Wed, 17 Mar 2021 17:30:24 GMT] : : @azure/msal-node@1.0.0 : Info - getAuthCodeUrl called
[Wed, 17 Mar 2021 17:30:24 GMT] : : @azure/msal-node@1.0.0 : Verbose - initializeRequestScopes called
[Wed, 17 Mar 2021 17:30:24 GMT] : : @azure/msal-node@1.0.0 : Verbose - buildOauthClientConfiguration called
[Wed, 17 Mar 2021 17:30:24 GMT] : : @azure/msal-node@1.0.0 : Verbose - createAuthority called
[Wed, 17 Mar 2021 17:30:24 GMT] : : @azure/msal-node@1.0.0 : Verbose - Retrieving all cache keys
[Wed, 17 Mar 2021 17:30:24 GMT] : : @azure/msal-node@1.0.0 : Verbose - Getting cache key-value store
{"errorCode":"endpoints_resolution_error","errorMessage":"Error: could not resolve endpoints. Please check network and try again. Detail: ClientAuthError: openid_config_error: Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints. Attempted to retrieve endpoints from: https://login.microsoftonline.com/09876543210987654321/v2.0/.well-known/openid-configuration","subError":"","name":"ClientAuthError"}
我不知道为什么会出现此错误,我没有连接到 VPN 或仅使用我的常规 ISP 的代理。
【问题讨论】:
-
嗨 Jason,问题是我无法更改这些设置,因为它们是为我的组织设置的。
-
正确的步骤是这样的。如果你没有权限设置,应该没办法。
-
如果我的回复有帮助,请采纳为答案(点击回复旁边的标记选项将其从灰色切换为填写。),请参阅meta.stackexchange.com/questions/5234/…
标签: node.js azure-active-directory msal