【问题标题】:Tenant 'xxx' not found while calling MS Graph API on behalf of a user代表用户调用 MS Graph API 时未找到租户“xxx”
【发布时间】: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


【解决方案1】:

根据您的错误消息,您可以导航到您的 Azure Active Directory 并确保您的 TenantID 与您的应用程序中的内容相匹配。

错误信息: AADSTS90002:未找到租户“xyz”。如果租户没有活动订阅,则可能会发生这种情况。检查以确保您拥有正确的租户 ID。

TenantID

【讨论】:

  • 租户没有任何有效订阅
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-12-18
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多