simonrob / email-oauth2-proxy

An IMAP/POP/SMTP proxy that transparently adds OAuth 2.0 authentication for email clients that don't support this method.
Apache License 2.0
858 stars 96 forks source link

Question: How to use this with Outlook.com? #227

Closed NoudH closed 9 months ago

NoudH commented 9 months ago

Outlook.com recently disabled its imap-legacy.office365.com and I need to support Outlook 2007 (good luck getting your blind grandma to use a newer version 😕).

I got this proxy setup, Outlook is connecting with and got to the Microsoft login screen. However, whenever I try to login with her credentials we get an error that roughly translates to: "Please login using your work or school account, not your personal one."

Do you know if it's possible to use this with Outlook.com? And, if so, what the settings would be? Everything I find about it online talks about when you have your own Azure environment with Azure AD, but I can't find any info regarding the Outlook.com environment itself.

Thanks in advance!

simonrob commented 9 months ago

I'm not actually sure what an Outlook.com account is defined as nowadays because of all the different co-mingled services Microsoft offers, so your experience may differ here. However, I tried just now with an old Hotmail account, and got the same error as you.

It looks like perhaps Microsoft has disabled IMAP for non-paid accounts? The support page does mention that IMAP may not work: If you use Outlook.com to access an account that uses a domain other than @live.com, @hotmail.com, or @outlook.com, you might not be able to sync your accounts using IMAP. To resolve this, remove the connected IMAP account in Outlook.com and reconfigure it as a POP connection. This doesn't quite provide an answer, as I was using a Hotmail account, which is explicitly excluded from this. But it does hint at the potential for IMAP issues with these free accounts.

You may need to switch to POP3 I'm afraid. The proxy can still help if OAuth is required, but unfortunately the authentication error you're getting is not something it it has any control over.