Bug 409183

Summary: Using Password based authentication when Oauth2 is selected
Product: [Frameworks and Libraries] Akonadi Reporter: Bradley Nelson <bradleynelson102>
Component: EWS ResourceAssignee: kdepim bugs <kdepim-bugs>
Status: REPORTED ---    
Severity: major CC: brendon, inkbottle007, jlp, kde, kde, kishore96, krissn, marcelo.escobal, philipp.reichmuth
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Logs Showing Problem

Description Bradley Nelson 2019-06-25 17:27:51 UTC
Created attachment 121142 [details]
Logs Showing Problem

SUMMARY
Kmail office 365 connection not working logs say that it is using password based authentication


STEPS TO REPRODUCE
1. Create New Account
2. Enter Email
3. Select OAuth2 (Office 365)
4. enter EWS URL: https://outlook.office365.com/ews/exchange.asmx
5. Hit Try Connect
6. Enter password in web window

OBSERVED RESULT
in logs (see attached) it says that it is using password based authentication


EXPECTED RESULT
used OAuth2 authentication


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Arch Linux
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 5.59.0
Qt Version: 5.12.4

ADDITIONAL INFORMATION
Comment 1 Marcelo Escobal 2020-06-02 02:50:48 UTC
Same problem with Akonadi EWS version 5.13.3(19.12.3)
Comment 2 Chandradeep Dey 2020-07-14 09:57:09 UTC
Same issue here

KDE Plasma version: 5.19.3
KDE Frameworks version: 5.72.0
Qt version: 5.15.0
Kernel version:
Comment 3 Chandradeep Dey 2020-07-14 10:01:51 UTC
Sorry about last comment, pressed Save Changes by accident

Kernel version: 5.7.8-arch1-1
KDE PIM version: 20.04.3
Comment 4 Allan Sandfeld 2020-10-14 10:08:48 UTC
What OAuth2 support is that? All I could find was specific google oauth support. I think generic OAuth2 is basically missing.
Comment 5 Brendon Higgins 2020-10-28 20:23:06 UTC
(In reply to Allan Sandfeld from comment #4)
> What OAuth2 support is that? All I could find was specific google oauth
> support. I think generic OAuth2 is basically missing.

This is in the Exchange Web Service component. I wasn't able to find it in KMail, and ended-up going through akonadiconsole for it, but there might be a more normal way to it.

I wish generic (IMAP) OAuth2 worked; I miss being able to have messages downloaded locally for offline...
Comment 6 Allan Sandfeld 2020-10-28 20:31:31 UTC
Yeah. I looked into it. We basically have two different OAuth2 hacks, one for gmail and one for ews. There is code for in the IMAP and SMTP code but it is all tied up in the GMail specific hack.

Then again OAUTH2 is mostly a scam to collect more data on you, which is why they require your already tracked browser to log in. So it is no wonder it isn't properly standardized.
Comment 7 phrxmd 2023-11-03 23:46:56 UTC
Part of the problem could have to do with the bad UI behaviour described in bug 476527 - if I want OAuth2, the "OK" button should be clickable without having to enter random data for the username and password.