Created attachment 566598 [details] emerge-info.txt evolution-ews supports OAuth2 authentication for Office365 since evolution-ews-3.27.91. I was able to test this on Arch Linux [2,3] with the same package versions and it works. However on Gentoo Linux the choice to pick the authentication type "OAuth2 (Office 365)" is missing when trying to connect an Office365 account. It should appear when setting up a new account, on the third page "Receiving E-Mail" when the "Host URL" field matches "https://outlook.office365.com/EWS/Exchange.asmx" [1]. However only the authentication types "Basic", "NTLM" and "Kerberos" are displayed. The type "OAuth2 (Office 365)" is missing however. I compiled evolution and evolution-ews with the following use flags: [I] mail-client/evolution Installed versions: 3.30.5(2.0)(05:22:42 PM 02/26/2019)(spell ssl -archive -bogofilter -geolocation -gtk-doc -highlight -ldap -spamassassin -weather -ytnef) [I] gnome-extra/evolution-ews Installed versions: 3.30.5^t(05:23:06 PM 02/26/2019)(-test) Did I miss some necessary useflags or dependencies? [1] https://wiki.gnome.org/Apps/Evolution/EWS/OAuth2 [2] https://www.archlinux.org/packages/extra/x86_64/evolution [3] https://www.archlinux.org/packages/extra/x86_64/evolution-ews
This requires at least USE=oauth on evolution-data-server. Do you have that already? You are showing only evo and evo-ews flags above.
Ah, that was possibly the hint I was missing, I didn't check evolution-data-server. Added the "oauth" usefalg and now it works. Thanks!
I wonder how common these oauth use cases are and if we maybe should mirror the USE flag somehow to avoid such trouble more. Or maybe we should default enable oauth on eds
I'd guess it's a rather niche case, since OAuth for Exchange is only needed if the "normal" authentication is disabled for some reason. In my case the company switched the identity provider and used SAML2 logon. Therefore I had to switch to OAuth (thank god Milan Crha cared to implement it!) which still works fine. It probably wouldn't hurt to move the use flag to the evolution ebuild as it's usually the first place people might look for it (at least for me it was).
It can't be moved, because it controls if the support is built or not in evolution-data-server, so the actual feature control has to be done there. It would have to be mirrored somewhere else instead. But then the case could be made to mirror all of them, and that's not something we would want to do for everything.
(In reply to Mart Raudsepp from comment #3) > I wonder how common these oauth use cases are and if we maybe should mirror > the USE flag somehow to avoid such trouble more. Or maybe we should default > enable oauth on eds I am not using evolution-ews but, in my case, after updating to evolution-data-server-3.30 (from 3.26), my gmail account *using POP3* stopped to work without evolution-data-server[oauth]. In that case I was getting the error: Failed to authenticate: Data source "XXX" does not support OAuth 2.0 authentication" If I tried to use "Password" instead of (default chosen by the assistant) Oauth, gmail was rejecting the connection because it thinks an "insecure app" is trying to connect to it. I wonder if this could be caused by a mis-sync between Evolution 3.30 stack and gnome-online-accounts-3.28... but in current situation, I need evolution-data-server with oauth USE flag to allow to re-add the POP3 Gmail account