[Users] claws-mail with OAuth2 IMAP O365Q
Philippe CARA
Philippe.Cara at vub.be
Sat Jan 13 12:01:58 UTC 2024
Hi David,
Thank you for your explanation. I get a better understanding of the system.
Still it does not work for me...
When I copy the 0.AUg... very long string and click "Authorize" I get an error
"OAuth2 missing authorization code" in the log. See https://imgur.com/a/XBQdwtW
I noticed that at the end of the very long string there is also "&session_state=...". I
tried trimming that but the same error occurs.
Still puzzled :-(
Philippe
________________________________________
From: Users <users-bounces at lists.claws-mail.org> on behalf of David Fletcher <David at megapico.co.uk>
Sent: Friday, January 12, 2024 13:18
To: users at lists.claws-mail.org
Subject: Re: [Users] claws-mail with OAuth2 IMAP O365Q
Hi Philippe,
The code you need is in that URL that said it could not connect.
> With the other one 9e5f94bc-e8a4-4e73-b8be-63364c29d753
> I get redirected to https://localhost/?code=0.AUgAqHxbaagtRUWi2k...very
> long string...&session_state=743f00b8-9f12-4350-8e57-67fe8b93ba18
Just copy the 0.AUgAqHxbaagtRUWi2k...very long string part into the
authorisation box on Claws Mail's Oauth2 account configuration box.
The redirect aims to do this automatically by redirecting your browser so
that code arrives at a listening port on localhost. But you can enter
the code manually from the URL too. Then the authorisation process
should complete.
In a similar way the request sent to the server to start this
authorisation process includes the redirect URI in the string, so you
can change it there rather than recompiling the whole program. From the
Copy Code button in the Oauth2 configuration screen you should find the
code looks something like this:
https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=12345&redirect_uri=http%3A%2F%2F127.0.0.1%3A8888&response_type=code&scope=offline_access%20https%3A%2F%2Foutlook.office.com%2FIMAP.AccessAsUser.All%20https%3A%2F%2Foutlook.office.com%2FPOP.AccessAsUser.All%20https%3A%2F%2Foutlook.office.com%2FSMTP.Send&tenant=common&response_mode=query
Just change the redirect URI to whatever you need, ensuring it is still
in the correct format using %3A%2F%2F for :// . However, it seems like
you're past this stage now and can just enter the code from the
0.AUgAqHxbaagtRUWi2k...very long string.
Best wishes, David.
_______________________________________________
Users mailing list
Users at lists.claws-mail.org
https://lists.claws-mail.org/cgi-bin/mailman/listinfo/users
More information about the Users
mailing list