I had a strange issue recently when trying to login to the Azure Portal. Quite simply I would enter my login details and ended up with this message – Bad Request – Request Too Long, HTTP Error 400. The Size of the request headers is too long.
The screen shot looked like:
I use MFA – Multi Factor Authentication, I am not really sure if this was contributing to the problem but after some research I found out that this login problem happens when there are too many cookies, something is bloating my request, the question is I dont know what is, yet.
As a work-around I go and clear the cookies from anything Login.Microsoft.
I remove these and no longer get the error 400.
I know this isn’t the best solution ( deleting cookies) especially if this keeps happening. I do need to get to the root cause but at least there is an interim solution for this issue.