Azure AD B2C - HTTP Error 400 - Request Header field is too long
See original GitHub issueI am using Microsoft.Idendity.Client(V4.0.0) library along with Xamarin for login to Azure AD B2C account.
Previously I was using external browse(chrome) for opening the login window. And yesterday I changed the code like given below.
var result = await _authenticationClient.AcquireTokenInteractive(_settings.Scopes)
.WithParentActivityOrWindow(ParentActivityOrWindow)
.WithPrompt(Prompt.ForceLogin)
.WithUseEmbeddedWebView(true)
.ExecuteAsync();
I have changed the behavior to open the embedded browser for login by adding the .WithUseEmbeddedWebView(true)
configuration.
After changing this, I am getting an error page(intermittently) saying that “Bad Request - Header Field too long”
HTTP Error 400 - Request Header field is too long.
Attaching the error image for your reference.
Could you please let me know why this issue is coming and how I can resolve it. Do I need to consider for something else, in case if I am using EmbeddedWebView.
Also I have noticed that It is not coming every-time. Seems like something weird happen with my code.
Please help.
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (1 by maintainers)
Top GitHub Comments
I have added the below code when the user try for re-login and everything works fine for me.
Thanks for following up @rkshnair !