On Thu, Apr 13, 2023 at 05:05:31PM -0400, Craig Gallek wrote: > I've managed to get this to work with gmail: > https://gitlab.com/muttmua/mutt/-/blob/master/contrib/mutt_oauth2.py.README#L85
I have used the mutt_oauth2.py script to authenticate against an institutional office365 account over IMAP (script is at URL above with .README removed). I changed exactly two things in the script: (a) the GPG identity, and (b): 'client_id': '9e5f94bc-e8a4-4e73-b8be-63364c29d753' (that's nicked from a recent public version of Thunderbird, which I guess is not strictly kosher but it does work as long as you remember this when you see the authorisation message from Microsoft asking if Mozilla should be allowed access to your email. The client secret is the empty string for this id. It saves the faff of having to create an app registration and it allows the 'common' endpoints to work rather than needing your tenant ID). imc