Solving Gmail IMAP error ‘Web login required (Failure)’

At work we have been using Google apps to host some of our customers domain e-mail accounts. The other day one of our customer collaborators complained that when accessing e-mails through IMAP (on Outlook 2007) he was getting the following error:

After repeatedly checking his IMAP settings i decided it was not a problem with his settings so I looked around the web and found a quite dated tutorial (back from 2008). Since all my other approaches hadn’t worked i decided to try it, here’s the steps i followed:

  1. Logged in to the web portal with the gmail account that was returning that error
  2. Disabled both POP3 and IMAP functionality and logged off
  3. Logged in with a Administrator privileged account for that domain
  4. Goto “Domain Settings” and section “New Services and Pre-release Features”
  5. Disable “Automatically add new services when they become available” and “Enable pre-release features”
  6. Saved these changes
  7. Re-enabled “Automatically add new services when they become available” which was the one i wanted
  8. Saved these changes
  9. Logged off (as Administrator)
  10. Logged in to the web portal with the gmail account that was returning the error.
  11. Re-enabled both POP3 and IMAP functionality.

After this the user reported that IMAP was working again for him. It amazes me that such a simple and dated (almost 2 years now) solution like this has worked but luckily it did.