Recently we started to get strange exception on the EWS: SyncFolderItems call, this is the error : "An internal server error occurred. The operation failed., IdAndSession.MailboxSession: session is not IMailboxSession".
Please note that code didn't change for more than year.
This is what I have , looks like its a bug and Microsoft is working on it. there are many people reported this and talked to MS and they have got the same answer that "its a bug" Please refer this forum below and let me know if this helps!
Same issue here, it's already a week with this strange error, and Microsoft support doesn't provide any meaningful answers, only that they don't support 3'rd party applications and that it's a connectivity issue. Very non-professional.