Closed dkwo closed 7 months ago
I had to do the following to get things mostly working with o365. Formatted as a rough list from my notes before I gave up on using oama for the time being. I ended up using the mutt_oauth.py
script with gpg and my ids/secrets set to get a valid xoauth2 token for use with offlineimap.
@mcrosson Thanks. Unfortunately, I don't think I have admin access in my organization. What worked for me, was to use the new thunderbird client_id
with an empty secret in mutt/oauth2.py
script.
thank you @dkwo , it works indeed with thunderbird client_id and mutt_oauth2.py
.
I haven't tried but gnome evolution also has a public client_id that can be used: https://gitlab.gnome.org/GNOME/evolution/-/wikis/EWS-OAuth2
@pdobsan I would like to use oama instead of mutt_oauth2.py, so that I can have all my conf and secrets managed by a single tool. IIUC using an already existing client_id stops us from using a "localhost" redirect_uri, since thunderbird or evolution were not configured to do that. (and I don't know of any "open source" client_id having a localhost redirect_uri)
Could it be possible to add at least "devicecode" authentication method in oama please ? it needs user action in copying-pasting the code in the browser, so it's less "automatic" than oama's actual workflow, but it could allow us to use thunderbird client_id in oama, since microsoft client creation is so cumbersome. thanks anyway for the software !
it seems thunderbird recently removed their client_secret for microsoft, and switched to another method. at least, I'm unable to get a new token using their older client_id and secret within mutt/oauth2.py (this was triggered for me by a password change. it may have been broken for a while.)
I understand this question is not specific to mailctl/oama, but does anyone know a working way to get a token for microsoft accounts, in case the user cannot register an app themselves, like with universities or corporations?
in other words, how do you satisfy the requirement 'You need to provide your own client_id and client_secret of your application or of a suitable FOSS registered application.' for this specific case?
I'm out of ideas. Thanks.
edit: thunderbird ref https://bugzilla.mozilla.org/show_bug.cgi?id=1685414