Ian Collier wrote in
<[email protected]>:
|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.REA\
|> DME#L85
|
|I have used the mutt_oauth2.py script to authenticate against an institu\
|tional
|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).
I can confirm that this one works, both IMAP and SMTP are
possible, tenant=common! However, they now forbid "devicecode"
flow. "auth" works. ("redirect" not tried. And tThis is all my
script thing.) Interestingly there is no refresh_token no more!!
P.S.: "my thing", because i use that not the mutt contrib/ script
for "my MUA" not mutt is
https://git.sdaoden.eu/browse/s-toolbox.git/plain/oauth-helper.py
ie
curl -u moon:mars --basic -O
https://git.sdaoden.eu/browse/s-toolbox.git/plain/oauth-helper.py
and config file (-R)
authorize_endpoint=https://login.microsoftonline.com/common/oauth2/v2.0/authorize
devicecode_endpoint=https://login.microsoftonline.com/common/oauth2/v2.0/devicecode
token_endpoint=https://login.microsoftonline.com/common/oauth2/v2.0/token
redirect_uri=https://login.microsoftonline.com/common/oauth2/nativeclient
tenant=common
scope=https://outlook.office.com/IMAP.AccessAsUser.All
https://outlook.office.com/POP.AccessAsUser.All
https://outlook.office.com/SMTP.Send
flow=auth
access_token=
client_id=9e5f94bc-e8a4-4e73-b8be-63364c29d753
[email protected]
timeout=
timestamp=
--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)