【问题标题】:OpenIdConnect error - Tenant identifiers may not be an empty GUIDOpenIdConnect 错误 - 租户标识符可能不是空的 GUID
【发布时间】:2017-09-08 16:58:48
【问题描述】:

我正在尝试使用 OWIN Open ID Connect 中间件将我的 ASP.NET 应用程序的身份验证外包给 Azure Active Directory。应用程序在访问需要授权的页面时成功重定向到 Azure AD 登录页面。但是,在登录 Azure AD 时,我遇到了以下错误:

AADSTS90002:请求的租户标识符“00000000-0000-0000-0000-000000000000”无效。租户标识符不能是空的 GUID。

这里是UseOpenIdConnectAuthentication 的电话。授权 URL 中包含的租户是 f82d0e29-6018-43c6-b806-1f46a009ff4a。那么,为什么 Azure AD 认为我正在为租户传递一个空的 GUID?

app.UseOpenIdConnectAuthentication(new OpenIdConnectAuthenticationOptions
            {
                AuthenticationType = "AzureAd",
                Caption = "Office 365",
                Scope = "openid email profile",
                ClientId = "e34401b2-6a9f-4547-9229-f0d93a33b1a1",
                Authority = "https://login.windows.net/f82d0e29-6018-43c6-b806-1f46a009ff4a/",
                PostLogoutRedirectUri = "http://localhost:44333",
                RedirectUri = "http://localhost:44333",
                AuthenticationMode = AuthenticationMode.Passive,
                SignInAsAuthenticationType = signInAsType
            });

【问题讨论】:

  • 我尝试重现此问题,但失败了,如果您仍有此问题,请随时告诉我。
  • 我在尝试获取令牌时仍然收到此错误,即使对于新用户也是如此。检查correlationId fdd189bb-f220-4e93-9e66-9aa7649d08a4

标签: asp.net azure owin azure-active-directory openid-connect


【解决方案1】:

目前 AAD 中可能存在错误。另一个线程也与这个线程大约在同一时间开始:Empty GUID error when using Azure AD consent flow - 根据一条评论,AAD 团队知道并正在调查它。

更新:

查看我的这个问题的版本以获得完整的诊断和解决方案:

Azure Active Directory passing empty GUID for tenantId with default template

【讨论】:

  • 好的,我明白了。谢谢你告诉我。
  • 同样的问题,用微软账户登录时出错。当我直接在活动目录中创建新用户时,没有错误。那个bug还没有解决..
猜你喜欢
  • 2012-09-24
  • 1970-01-01
  • 2017-12-01
  • 2021-09-04
  • 2019-06-12
  • 2014-10-14
  • 2016-04-14
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多