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 ?

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

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

    hi

    What is your Azure AD B2C code?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • 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);
                    },
                    }
                    }
            
    
    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Please share the logs of your app.

    Maybe it can't handle the cancel event

    https://github.com/dotnet/aspnetcore/blob/1b15d0e92f139d853b5a1b740cd571d9d08e672f/src/Security/Authentication/OpenIdConnect/src/OpenIdConnectHandler.cs#L789

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
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 v10.8.0-preview. Updated on September 28, 2026, 11:44
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.