My company is using Microsoft Exchange server 2016. Each mailbox only has 1G space allocated. How can I get the mailbox usage information using python exchangelib?
I am using Python 3.9.5 with exchangelib 4.4. I can use exchangelib to send and receive email however, cannot find the right way to get the mailbox space.
EWS does not provide a direct API for this, but it seems you can get the folder size using extended properties. See e.g. How do I get folder size with Exchange Web Services 2010 Managed API?
exchangelib does support extended properties. See https://ecederstrand.github.io/exchangelib/#extended-properties