Open Closed

Handling Azure AD B2C error message containing the error code -AADB2C90091.** #5086


User avatar
0
madklm_16 created

ABP Framework version:** v6.0.0

UI type: Angular

DB provider: EF Core

Tiered (MVC) or Identity Server Separated (Angular): yes / no

Exception message and stack trace:

Steps to reproduce the issue:"
Handling Azure AD B2C error message containing the error code -AADB2C90091.
I am trying to handle one of the specific errors returned from Azure Ad B2C , error code -AADB2C90091. (user cancelled sign up / login flow)
I have tried hooking up to OnAuthenticationFailed in option.Events in the configuration. But it doesnt seem to flow there.
Is there anything else I need to be doing to catch this ?


3 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    What is your Azure AD B2C code?

  • User Avatar
    0
    madklm_16 created

    .AddOpenIdConnect("OpenIdConnect", "Azure B2C OpenId", options =>
    {
    options.SignInScheme = IdentityConstants.ExternalScheme;
    options.SignOutScheme = IdentityConstants.ExternalScheme;
    options.ForwardChallenge = "OpenIdConnect";

                options.ClientId = configuration["Authentication:OpenId:ClientId"];
                options.Authority = string.Format(configuration["Authentication:OpenId:Authority"], configuration["Authentication:OpenId:TenantId"]);
                options.SignedOutRedirectUri = new Uri(configuration["App:AngularUrl"]).ToString();
               
                options.ResponseType = OpenIdConnectResponseType.IdToken;
    
                options.SaveTokens = true;
    
                options.MetadataAddress = new Uri(string.Format(configuration["Authentication:OpenId:SignInSignUpPolicyUrl"], configuration["Authentication:OpenId:TenantId"])).ToString();
    
                options.GetClaimsFromUserInfoEndpoint = true;
    
                options.Scope.Add("email");
                options.ClaimActions.MapAll();
                
    
                options.Events = new OpenIdConnectEvents()
                {
                    OnTokenValidated = (tokenValidatedContext) =>
                    {
                        
    
    
                        return Task.FromResult(0);
                    },
                    }
                    }
    
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.3.0-preview. Updated on June 13, 2025, 11:37