There are several common reasons that I have seen online for this error. From this related thread:
1) It is a Microsoft's mechanism to shut down chatty clients. The solution would be to login to this account less frequently. (Remember to close the connection properly use Close method and 'using' clause around Imap instance).
2) It is due to a bug in MS IMAP implementation. If the client presents a valid user name but an invalid password, the server accepts the login, but subsequent commands fail with the aforementioned error message.
3) It is a shared mailbox and you are using incorrect login scheme. Use Login method and Username@DomainName\SharedMailbox@DomainName for O365 per: https://www.limilabs.com/blog/shared-mailbox-office365
4) It's a server issue and you may need to reboot the server.
Let me know if this helps at all.