yes I have the code like the one you sent.
I don't know how to reproduce the problem .
i sent to your email
HI , I am using asp and angular I am trying to integrate Azure AD for Authentication.
private void ConfigureAuthentication(ServiceConfigurationContext context, IConfiguration configuration)
{
JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Clear();
JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Add("sub", ClaimTypes.NameIdentifier);
context.Services.AddAuthentication()
.AddAzureAD(options => configuration.Bind("AzureAd", options));
context.Services.Configure<OpenIdConnectOptions>(AzureADDefaults.OpenIdScheme, options =>
{
options.Authority = "[https://login.microsoftonline.com/"](https://login.microsoftonline.com/%22 "https://login.microsoftonline.com/%22") + configuration["AzureAd:TenantId"] + "/v2.0/";
options.ClientId = configuration["AzureAd:ClientId"];
options.CallbackPath = configuration["AzureAd:CallbackPath"];
options.ResponseType = OpenIdConnectResponseType.CodeIdToken;
options.RequireHttpsMetadata = false;
options.TokenValidationParameters.ValidateIssuer = false;
options.GetClaimsFromUserInfoEndpoint = true;
options.SaveTokens = true;
options.SignInScheme = IdentityConstants.ExternalScheme;
options.Scope.Add("email");
options.ClaimActions.MapJsonKey(ClaimTypes.NameIdentifier, "sub");
});
}
I get the following errors
i found th error in logs
System.InvalidOperationException: No authentication handler is registered for the scheme 'Windows'. The registered schemes are: OpenIddict.Validation.AspNetCore, Identity.Application, Identity.External, Identity.TwoFactorRememberMe, Identity.TwoFactorUserId, Abp.ConfirmUser, Abp.ChangePassword, OpenIddict.Server.AspNetCore, Google, Microsoft, Twitter. Did you forget to call AddAuthentication().AddSomeAuthHandler? at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme)
Hi,
Sorry, I don't even know the UI type and ABP version of your project.
This information is not enough to reproduce the problem.
Could you just share a project that can reproduce the problem to make progress? my email is shiwei.liang@volosoft.com Thx
it was a server permission issue the program was not have the "write" permission to generate logs , I sent the logs to your email .