SIMPLE RESOLUTION (For Outlook accounts at least)
TLDR - Go to your outlook account via browser and open your settings and under MAIL - FORWARDING AND IMAP scroll to the bottom and check let devices and apps use IMAP.
I ran into the same issue - now in 2025. Don’t know if anyone still uses MailSpring (Really dont like Thunderbird - trying Mailspring now. If anyone has better option than MS for Linux/Ubuntu let me know. Something with a modern ui). I was trying to connect a outlook account that was created very recently - within the year 2025.
The overall issue seems to be that microsoft has disabled/reduced the use of IMAP as a valid resource/login for user accounts created around and after 2021. I had no problem connecting an outlook account that was created pre-2019.
I was able to work around this issue by visiting my outlook settings for the newer account. The menu option Forwarding and IMAP had an option to allow IMAP connections. When I tried to connect Mailbird to the account after making that change, it connected successfully. Hope this helps someone!