I tried both. The error from davmail suggests it was specifically blocked/prohibit and I failed using actual Thunderbird.
Hi, I guess you have already tried.
My Uni also made it difficult but I succeeded in setting up a working davmail, using the exchange protocol.
Mail my username at gmail.com if you think I can help.
Gateway: Exchange Protocol: O365Interactive OWA or EWS (Exchange) URL: https://outlook.office365.com/EWS/Exchange.asmx
(follow the instructions at https://davmail.sourceforge.net/faq.html)
My organization also explicitly blocks access from other clients than Microsoft Outlook, even if the credentials are correct and the protocol is supported. They also refused providing an exception, citing that I can just use the web interface via Microsoft Edge on Linux. (Which I prefer not to do for many reasons, e.g. backing up my emails locally, working offline, and authoring using native tools.)
Currently, only Thunderbird with the proprietary "OWL" extension somehow manages to connect despite the block. My understanding is that they somehow abuse the web interface to do so, instead of actually going through the proper protocols, but not sure.
If someone has another way to access Exchange servers that intentionally blocks non-Outlook clients I’d love to hear about it.