Bug 429598

Summary: EWS Account Resource Cannot update OAuth2 Token
Product: [Applications] kmail2 Reporter: Jesse Osiecki <jesse>
Component: config dialogAssignee: kdepim bugs <kdepim-bugs>
Status: REPORTED ---    
Severity: normal CC: mac-wang
Priority: NOR    
Version: 5.14.2   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: email accounts list in Kmail with the error

Description Jesse Osiecki 2020-11-24 18:25:38 UTC
Created attachment 133613 [details]
email accounts list in Kmail with the error

SUMMARY
Password expiry for a corporate email account with Office365 causes the OAuth token to expire. EWS account resource goes into failed state "Unable to connect to Exchange server". "Modify..." does nothing, with no errors logging. Clicking "Restart" on the account and then quickly clicking "Modify..." allows the user to open the account configuration dialog briefly, however it is forcefully closed when the account's status returns to "Unable to connect to Exchange Server"

STEPS TO REPRODUCE
1. Let password expire (and OAuth2 token)
2. Click "Modify..." for the account in question in the Kmail accounts page (fail)
3. Click "Restart" and then "Modify...", the account details page will pop up and then disappear.

OBSERVED RESULT
Unable to modify the account to update the Oauth2 token

EXPECTED RESULT
Should be able to update the Oauth2 token

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.71.0
Qt Version: 5.12.7

ADDITIONAL INFORMATION
openSUSE Leap 15.2

relevant logs 
Nov 24 13:04:21 jesse-5400 akonadi_ews_resource[3565]: org.kde.pim.ews: Authentication failed:  Interactive authentication request denied
Nov 24 13:04:21 jesse-5400 akonadi_ews_resource[3565]: org.kde.pim.ews: Authentication failed:  Interactive authentication request denied
Nov 24 13:04:21 jesse-5400 akonadiserver[24262]: org.kde.pim.akonadiserver: Subscriber "AgentBaseChangeRecorder - 94503167294432" disconnected
Nov 24 13:04:21 jesse-5400 akonadi_control[24259]: org.kde.pim.akonadicontrol: Application '/usr/bin/akonadi_ews_resource' crashed. No restart!