Forum Discussion
ERROR: "Bad Request - Request Too Long" When Signing In To Microsoft 365 Using Work Profiles
When the following conditions are true:
- Using the latest version of Microsoft Edge browser.
- When the browser is signed in to any Microsoft 365 account.
- When browsing to any Microsoft 365 website.
I receive the following browser error:
Bad Request - Request Too Long
HTTP Error 400. The size of the request headers is too long.
When I sign in to any Work Profile, no matter the account/tenant, the moment I browse to any Microsoft 365 page i.e. any website that redirects via: https://login.microsoftonline.com/, I receive the error above e.g. https://office.com, https://admin.microsoft.com, https://portal.azure.com etc.
If I sign-out from the Work Profile, everything works fine (i.e. I am presented with the usual Microsoft 365 sign-in dialogue for username and password, then 2FA code, then the expected page appears), if I then sign-in > browse > error ... sign-out, works fine, sign-in, error etc. ... consistently repeatable.
Using 'Browse as Guest' or any 'Personal' or 'Work Profile' without signing in works fine.
TROUBLESHOOTING ALREADY CARRIED OUT
- Deleted/recreated all profiles.
- Signed in / out multiple accounts on multiple tenants.
- Sync options > all, some, none.
- 'Automatic sign in on Microsoft Edge' enabled & disabled.
- 'Allow single sign-on for work or school sites using this profile' enabled & disabled.
- 'Automatic profile switching' all options on & all off.
- Deleted all cache/cookies, from all time in all profiles.
- Reset settings in all profiles.
- Completely uninstalled/reinstalled Microsoft Edge (i.e. Safe Mode > delete all files > all profile data> all temp files > all registry entries).
Q1 What could cause this error, only when the Work Profile is signed-in?
Q2 Aside from syncing settings, how would signing-in to the Work Profile effect OATH requests to https://login.microsoftonline.com/,?
Q3 Has anybody experienced this or something like this before?
Q4 Are there any troubleshooting steps I haven't tried?
2 Replies
- joelkinoCopper Contributor
Been having the same issue for a few days now. Absolutely infuriating and completely breaking my workflow.
Tried installing Edge Beta, Dev and Canary - none of those seem to open.
Installed Chrome - seems to have the same problem - so likely requires a fix from Chromium project.Hopefully it comes quickly.
- tictagBrass Contributor
joelkino I did eventually find the root cause and did eventually resolve this.
Root Cause: When Windows stores your credentials e.g. Edge Work Profiles, OneDrive, Windows sign-in etc., all these credentials are sent through to the website as a (layman's perspective) 'here are a few existing credentials I've got stored, can you use any of them to sign-in automatically?' suggestion to the website. These credentials (tokens?) all end up exceeding some limit on the size/length of a HTTP header field and you get the error.
Fix: My fix was probably a bit overkill because I deleted them all (I think I used Windows Credential Manager to do this, could be wrong). You can tell whether a credential is stored because in the Microsoft 365 login prompt pick-from-existing list it will say 'Connected to Windows', mine now just has three. Do check your OneDrive for Business accounts, I was connecting to 8 different tenants, with credentials stored for each, once I signed out and deleted the credentials, Edge Work profiles immediately started working again.Good luck!