mguessan / davmail

DavMail POP/IMAP/SMTP/Caldav/Carddav/LDAP Exchange and Office 365 Gateway - Synced with main subversion repository at
http://davmail.sourceforge.net
GNU General Public License v2.0
582 stars 86 forks source link

Unable to issue tokens from this API version (AADSTS500201) #363

Open SimPilotAdamT opened 4 months ago

SimPilotAdamT commented 4 months ago

Originally from #180, but that has been inactive since it was opened in 2021.

When using M365Interactive and M365Manual, the login prompt fails, showing the following error message:

AADSTS500201: We are unable to issue tokens from this 
API version for a Microsoft account. Please contact the 
application vendor as they need to use version 2.0 of the
protocol to support this.

According to this SO answer mentioned in https://github.com/mguessan/davmail/issues/180#issuecomment-2229198640, Davmail needs to change over to using ADFS for new logins to be successful. #134 fixes this issue iirc...

daaugusto commented 1 month ago

I'm facing the same issue, and therefore cannot access anymore my Outlook account with davmail (since October 1st, when Microsoft started enforcing the new authentication method). Is there a workaround?

daaugusto commented 1 month ago

I ended up ditching Davmail in favor of mutt_oauth2.py (along with mpop and msmtp). I had to join Microsoft Azure free account and configure it to allow accesses from mutt_oauth2.py, but it is working fine now.