Bug 443272

Summary: EWS account (resource) keeps going offline
Product: [Applications] kmail2 Reporter: lior
Component: miscAssignee: kdepim bugs <pim-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: kde, leosenko, mcnichol, mentiscompos+kdebug
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description lior 2021-10-04 00:43:45 UTC
SUMMARY
I'm using the EWS plugin with an oauth2 office365 university account in kmail2 5.18.1. 
The account keeps going offline with a notification saying "Resource XXXX is broken.
Authentication failed ". This can cycle between offline and online. 
If needed, I can manually update the account to go online. 

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Kubuntu 21.04 - Kernel 5.11.0-37
(available in About System)
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION

Using the kde plasma backports ppa on kubuntu. But it happens also on the native version.
Comment 1 JesseM 2021-12-11 00:51:05 UTC
I have the same issue in KDE Neon for two Office365 accounts from different organizations. It's very unpredictable for me - sometimes it will stay online for hours, but other times it goes offline more frequently. I usually click on the mailbox, press F5, and that usually works to get things up and running again although other times I'd have to send a message from that inbox to get the mailbox to respond. Can anyone offer some ideas about how to chase up this bug? A bit of a drag because kmail otherwise works really well and I'm starting to like it a lot because of the keyboard shortcuts and tight integration with Plasma.
Comment 2 leosenko 2023-01-26 11:44:53 UTC
Same issue here. I have noticed if i run kmail, request manual folder update and the account has a new mail, it almost always breaks.
Operating System: Debian GNU/Linux 11
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2
Kernel Version: 5.10.0-20-amd64
OS Type: 64-bit
Processors: 4 × Intel® Core™ i5-4570 CPU @ 3.20GHz
Memory: 7.7 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 4600
Comment 3 mentiscompos+kdebug 2025-11-21 20:51:35 UTC
Same issue here too. After some time the account just seems to stop, it is not always offline (as in it does not say next to the account 'offline') but new emails are not showing up. Doing a manual mail check sometimes retrieves new messages, and sometimes it does not. Updating the folder (by right-clicking on the account) also sometimes works and sometimes not. Restarting the account from the account configuration dialogue usually gets it going again; sometimes restarting akonadi is necessary. 

I am happy to gather debugging information and logs if someone will let me know what would be most helpful.
Comment 4 mentiscompos+kdebug 2025-11-21 20:52:52 UTC
Hit save before pasting my system info...

Operating System: openSUSE Tumbleweed-Slowroll 20251106
KDE Plasma Version: 6.5.2
KDE Frameworks Version: 6.19.0
Qt Version: 6.10.0
Kernel Version: 6.17.7-1.0.12.sr20251001-default (64-bit)
Graphics Platform: Wayland