Exception while fetching the quota detail in Office 365 mailbox using a java program

Here is the exception while fetching the quota detail in mailbox using a java program.

Quota Exception::

nested exception is:

   com.sun.mail.iap.BadCommandException: GETQUOTAROOT not supported

   at com.sun.mail.imap.IMAPStore.getQuota(IMAPStore.java:1985)

   at EmailNotificationScheduler.sendMail(EmailNotificationScheduler.java:207)

   at EmailNotificationScheduler.main(EmailNotificationScheduler.java:31)

Caused by: com.sun.mail.iap.BadCommandException: GETQUOTAROOT not supported

   at com.sun.mail.imap.protocol.IMAPProtocol.getQuotaRoot(IMAPProtocol.java:2733)

   at com.sun.mail.imap.IMAPStore.getQuota(IMAPStore.java:1983)

   ... 2 more

Please let us know how can we calculate mailbox size (free/available). We need this urgently.

BR,

Vikash