I now know manual overrides are not allowed.
Hi,
the above is not true. Being it so you’d not have it offered at all.
It’s just changing that after you configure the account is problematic
due to the code flaws. It needs fixing.
Why is Evolution skipping the EWS setup flow entirely, and how can I
force it to show the OAuth2 authentication option so Microsoft 365
can authenticate properly?
I only recently realized the authentication prompts right after the
account is configured/added can be tricky to show for some accounts.
Another things related to authentication, which needs fixing. I cannot
tell whether it’s what you face, though.
Let’s start with simple things:
a) what is the Host URL of the “Exchange Web Services” account, please?
It should be https://outlook.office365.com/EWS/Exchange.asmx
I suppose it’s close to that, otherwise you won’t get the OAuth2
authentication method offered.
b) you should see some error messages when the account is accessed,
like when you use Send/Receive button. Is there any such thing?
The status-bar can show that the account is connecting, or
the folder tree can show a spinner beside the account name when
it’s connecting. It happened recently that some servers advertise
IPv6 addresses, but when the client tries to connect there the
server does not respond. I do not recall seeing any such thing
with the Microsoft servers, but who knows. A workaround was to
disable IPv6 in the system.
c) I suppose you see the mail account in the folder tree, but it cannot
be expanded, because it does not know about any of the folders in
that mail account. You can see an icon on the right side of
the account name in the folder, probably something like a broken
connection or similar? It indicates there’s a problem with the
account. When you right-click the account name, you can pick
Refresh action, which will try to connect to the server.
d) run Evolution from a terminal as: EWS_DEBUG=2 evolution
and then see what it shows there. You can use the Refresh
function mentioned above to force it to do something. It shows
only communication between the server and the Evolution, thus
when it won’t communicate it does not show anything. It may
give a clue what failed, or what it is trying to do under the hood.
e) I’m not sure whether you have configured an EWS account on that
machine before or not. Uninstalling the plugin or even the app
does not clean up the keyring with the stored credentials.
You can use Seahorse to check what you have stored in the Passwords
keyring for the Evolution Data Server. The OAuth2 tokens for the EWS
account are named like “Office365[you@outlook.com]”. You can delete
them, then evolution --force-shutdown, then it’ll be like you’d
really configure the account for the first time on the machine.
I guess you are aware you use a very old version, yours 3.52.0 had been
release on 2024-03-15, and it’s even not the latest version in the
3.52.x series (it’s 3.52.4). The current stable series is 3.58.x, which
accumulated many fixes during those almost two years. You’d need to get
the latest version later this year anyway, because Microsoft is
disabling the EWS protocol for the office365.com addresses in October
this year [1]. Do not use the “Microsoft 365” account type in the
3.52.x, please, there had been added some important fixes meanwhile; it
had been too new in the 3.52.x. You can get the latest stable Evolution
either with more recent distribution version, or if you need to use
that old one, then you can get it for example through Flathub.org [2],
as a Flatpak application. It has its downsides in compare to the
packaged version, mostly related to integration with the desktop, but
it’s perfect solution for the old distributions, where getting latest
Evolution is close to impossible otherwise.
Bye,
Milan
[1] https://techcommunity.microsoft.com/blog/exchange/retirement-of-exchange-web-services-in-exchange-online/3924440
[2] https://flathub.org/apps/org.gnome.Evolution