No, becouse this is not how office365 accessing an imap mailbox works.
By the fact that shared mailbox has no user, they work using credentials provided by the users that has the access granted. Microsoft implementation of this kind of access use the \<shared-mailbox-alias> pattern to identify what mailbox should be access by IMAP. Using the username without the alias has no meaning for O365, and will not work.