【发布时间】:2021-01-04 08:36:54
【问题描述】:
我正在尝试按照 this Microsoft sample 文档使用 Azure AD 实现代表流程,在客户端一切都很好,但在 服务应用端(代表用户获取另一个Access Token并再次代表用户调用MS Graph API的azure函数),获取访问新的访问令牌(getNewAccessToken)失败并显示:
{
"error": "invalid_request",
"error_description": "AADSTS90002: Tenant 'xyz' not found. This may happen if there are no active subscriptions for the tenant. Check to make sure you have the correct tenant ID. Check with your subscription administrator.\r\nTrace ID: xxx \r\nCorrelation ID: yyy \r\nTimestamp: 2021-01-04 07:17:15Z",
"error_codes": [
90002
],
"timestamp": "2021-01-04 07:17:15Z",
"trace_id": "xxx",
"correlation_id": "yyy",
"error_uri": "https://login.microsoftonline.com/error?code=90002"
}
任何线索如何解决这个问题?
【问题讨论】:
-
如错误所示,请确保您使用正确的tenantId 或名称,例如 xyz.onmicrosoft.com
-
如果您导航到
https://login.microsoftonline.com/<<TenantId>>/.well-known/openid-configuration,请检查您的租户 ID/名称,然后它会给出结果。
标签: azure-active-directory azure-functions msal msal.js