Skip to content

400 Bad Request (Header Size) error when using Entra ID SSO for users from specific tenant #23

Discussion options

You must be logged in to vote

Thanks for the answer. The cookies are indeed large and that explains why this fails.

First, even though you are in the middle of a new sign in flow, there is also an existing previous session available (The .AspNetCore.Identity.Application) session. I would recommend to call SignOutAsync as part of the Challenge() method to logout of any existing session before initiating the new login.

Then the large external cookie can depend on a few things. If you have SaveTokens=true, the received tokens are stored in the cookies. If you do not need the tokens, I would suggest changing to SaveTokens=false. Note that Entra Id as far as I know doesn't use the id_token_hint parameter on logout so there…

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@RolandGuijt
Comment options

@o5231
Comment options

@AndersAbel
Comment options

Answer selected by maartenba
@o5231
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants