Forum Discussion
bradsalvin
Sep 26, 2023Copper Contributor
IMAP login to office365
Hello everyone I am ROR developer working on a application in which I have to read emails received on this office365 account via IMAP but currently I am not able to login via IMAP (did logged in onc...
VasilMichev
Sep 26, 2023MVP
Only OAuth is supported nowadays, as Microsoft pulled the plug on any basic authentication methods in the service, "plain" IMAP included. If you have an app that leverages IMAP, you need to update it to use leverage OAuth to get an access token/SASL XOAUTH2 encode and transmit it, as detailed here: https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth
- bradsalvinSep 27, 2023Copper ContributorFirst of all, thank you Vasil for sparing time.
Google terminated plain IMAP access last year but we use plain authentication by enabling 2FA and then using app password so havn't microsoft provided any way like this to use plain authentication.- VasilMichevSep 27, 2023MVPThey did, but that's not a real solution to the basic auth problem. So now that basic auth is deprecated, you have to switch to OAuth/SASL XOAUTH2.
- bradsalvinSep 27, 2023Copper Contributor
@Vasil, actually it is urgent and at the moment I just want to retrieve emails from Inbox so conventions and rules are secondary things. So I shall be grateful to you if you can guide me in that specific way/method other than OAUTH. Surely I am going to migrate to XOAUTH2 later on. Thank you.