【发布时间】: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