Bug 476527

Summary: Can't add EWS account with OAuth2 authentication, "OK" button stays greyed out until I enter random data for username and password
Product: [Frameworks and Libraries] Akonadi Reporter: phrxmd <philipp.reichmuth>
Component: EWS ResourceAssignee: kdepim bugs <kdepim-bugs>
Status: REPORTED ---    
Severity: normal CC: carl, inkbottle007, krissn
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

Description phrxmd 2023-11-03 23:43:26 UTC
SUMMARY
I can't add an EWS account with OAuth2 authentication because the "OK" button stays grayed out.
If I enter random data in the username/password fields and then deselect username/password authentication and select OAuth2 instead, the "OK" button becomes clickable and the account can be added.

STEPS TO REPRODUCE
1. Follow steps to add a new EWS account in Merkuro or KOrganizer - e.g. in Merkuro go to "Settings" → "Configure Merkuro Calendar" → "Accounts", click "Add Account", select "Microsoft Exchange Server (EWS)"
2. Enter e-mail address (e.g. an O365 account address)
3. Deselect automatic server recognition, enter EWS URL, e.g. https://outlook.office365.com/EWS/Exchange.asmx for O365
4. Select "OAuth2" authentication

OBSERVED RESULT
The "OK" button stays grayed out and the account cannot be added.

The workaround is to deselect "OAuth2" and select "Username/Password", deselect the domain checkbox, enter any random strings in the username and password fields, and then deselect "Username/Password" and select "OAuth2" again, then the OK button is clickable.

EXPECTED RESULT
The OK button should be clickable without having to enter random data for the username/password field that doesn't get used anyway.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20231026
KDE Plasma Version: 5.27.9
KDE Frameworks Version: 5.111.0
Qt Version: 5.15.11
Kernel Version: 6.5.8-1-default (64-bit)
Graphics Platform: Wayland
Comment 1 phrxmd 2023-11-03 23:45:03 UTC
This could be behind part of the problem described in bug 409183. However, bug 409183 is about username/password authentication being used according to the logs. This bug here has nothing to do with the logs, it's just about a UI issue in the account setup window.