C# Azure AD SingleSignOn出现错误
我订阅了azure,并且已经开发了一个应用程序,我正在尝试使用azure AD作为身份验证机制 我在Azure中创建了应用程序,添加了Azure AD作为身份验证机制,当我尝试登录时,出现了此错误 AADSTS65005:应用程序需要访问服务 (“”)您的组织 “123-32323-323232-3233”尚未订阅或启用。联系您的 IT管理员可以查看服务订阅的配置 这是我的创业课C# Azure AD SingleSignOn出现错误,c#,asp.net,azure,C#,Asp.net,Azure,我订阅了azure,并且已经开发了一个应用程序,我正在尝试使用azure AD作为身份验证机制 我在Azure中创建了应用程序,添加了Azure AD作为身份验证机制,当我尝试登录时,出现了此错误 AADSTS65005:应用程序需要访问服务 (“”)您的组织 “123-32323-323232-3233”尚未订阅或启用。联系您的 IT管理员可以查看服务订阅的配置 这是我的创业课 public partial class Startup { private static string
public partial class Startup
{
private static string clientId = ConfigurationManager.AppSettings["ida:ClientId"];
private static string aadInstance = ConfigurationManager.AppSettings["ida:AADInstance"];
private static string tenant = ConfigurationManager.AppSettings["ida:Tenant"];
private static string postLogoutRedirectUri = ConfigurationManager.AppSettings["ida:PostLogoutRedirectUri"];
string authority = String.Format(CultureInfo.InvariantCulture, aadInstance, tenant);
public void ConfigureAuth(IAppBuilder app)
{
app.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType);
app.UseCookieAuthentication(new CookieAuthenticationOptions());
app.UseOpenIdConnectAuthentication(
new OpenIdConnectAuthenticationOptions
{
ClientId = clientId,
Authority = authority,
PostLogoutRedirectUri = postLogoutRedirectUri,
RedirectUri = postLogoutRedirectUri,
Notifications = new OpenIdConnectAuthenticationNotifications
{
AuthenticationFailed = context =>
{
context.HandleResponse();
context.Response.Redirect("/Error?message=" + context.Exception.Message);
return Task.FromResult(0);
}
}
});
}
}
有什么想法吗
编辑1:
从我所需的权限中删除某些应用程序后,该应用程序似乎已被删除,但现在我收到此错误
编辑2:
再次删除和添加权限后修复。您似乎是在使用基于服务(“”)的公共数据服务进行开发。请确保您的组织没有订阅服务(“”) 请注意公共数据服务的先决条件:
谢谢,这是我的第一篇帖子。在发布问题之前,你应该先阅读一下