[Users] Oauth2 not working with Microsoft Exchange

Dustin Miller dustbiz at gmail.com
Fri Jul 22 13:30:21 UTC 2022


On Fri, 22 Jul 2022 14:40:49 +0200
Claudio Passerone <claudio.passerone at polito.it> wrote:

> I tried to setup my Microsoft Exchange account that I have with my
> organization using Oauth2, but I failed. I have Claws Mail 4.0.0
> running on Ubuntu 20.04 LTS. I followed the instructions found at
> https://www.claws-mail.org/faq/index.php/Oauth2 and did all the steps,
> until the end.
> 
> The instructions do not say it, but I assume I have to click on "Open
> default browser with request" to obtain an authorization code to
> enter in the configuration.
> 
DM: Hi, Claudio. Yes, it looks like the FAQ currently mainly deals with
how to set things up on the Azure platform rather than including all the
specific details of what needs to be done in the Claws mail settings.
Your assumption is correct.
> 
> The instructions say to use:
> 
>   Redirect URI: http://127.0.0.1:8888
> 
> However, when I click to open the default browser, I get an error
> message saying that the URI is not the correct one.
> 
DM: That's interesting. I saw that change had been made in the FAQ,
even though doing it the old way seemed to work fine for me, although
perhaps every once in awhile there was an error, but usually retrying
just one time to access email, etc. worked fine for me. When I finally
did get around to going into Azure to try to change this, I couldn't
figure out a good way to add and select this new URI, so I'm not
actually sure if I was successful or not. Anyway, things are still
working for me, so I guess that's the main thing. :) (BTW, I am on
Linux Mint 20.3 XFCE w/ Claws Mail 4.1.0.)
> 
> I had to select
> https://login.microsoftonline.com/common/oauth2/nativeclient instead.
> In this way the browser does not give any error message, I have to
> login (I'm redirected to my organization login page), and afterwards
> I simply get a blank page.
> 
DM: This sounds familiar. If it's as I remember, you will see a blank
page, but there should be some contents / string in the URL / address
box of your browser. If my assumption is correct, you just need to copy
this entire text string / URL and paste it into the 'Authorization
Code' field on the OAuth2 page, after which you need to click on the
'Authorize' button. Then (hopefully) it will start working for you.
HTH, ---Dustin
> 
> There is nothing else I can do, and even the source code of the page
> is empty. I don't understand what am I doing wrong. Does anybody have
> the same problem, or is there a fix?


More information about the Users mailing list