3 ms·
Funny, just dealt with the whole O365 authentication just this week. With moving to 2 factor authentication you need to use OAuth 2 to do anything with it. I ha
by podiki 5y ago
Funny, just dealt with the whole O365 authentication just this week. With moving to 2 factor authentication you need to use OAuth 2 to do anything with it. I have my (work) O365 email forwarded, so I do have normal IMAP access. I use isync/mbsync [1] to receive email, goimapnotify [2] to get pushed new email, read/reply/etc with mu4e [3] and org-msg [4] and org-mode, and until recently just plain SMTP to send mail. This last part will break with 2 factor, but found oauth2ms [5] to set up the OAuth to work with O365 SMTP. The trick was to find the "tenet ID" from the Azure page of your organization and to use Thunderbird's credentials [6] (or another mail program, since I can't make new app registrations on Azure to have my own "application"). That should also allow you to use IMAP with OAuth 2 as well, but haven't done that since I still have the forwarding. (As usual, I think the Arch Wiki [7] covers most of this too.)
[1] http://isync.sourceforge.net/ http://isync.sourceforge.net/
[2] https://gitlab.com/shackra/goimapnotify https://gitlab.com/shackra/goimapnotify
[3] https://www.djcbsoftware.nl/code/mu/mu4e.html https://www.djcbsoftware.nl/code/mu/mu4e.html
[4] https://github.com/jeremy-compostella/org-msg https://github.com/jeremy-compostella/org-msg
[5] https://github.com/harishkrupo/oauth2ms https://github.com/harishkrupo/oauth2ms
[6] https://hg.mozilla.org/comm-central/file/tip/mailnews/base/src/OAuth2Providers.jsm#l127 https://hg.mozilla.org/comm-central/file/tip/mailnews/base/s...
[7] https://wiki.archlinux.org/title/Isync#Using_XOAUTH2 https://wiki.archlinux.org/title/Isync#Using_XOAUTH2