Normally to log-in into a shared mailbox of Exchange/Office365 special username had to be used:
Office365 allows accessing shared mailboxes when authenticated using OAuth2:
"In case of shared mailbox access using OAuth2, application needs to obtain the access token on behalf of a user but replace the userName field in the SASL XOAUTH2 encoded string with the email address of the shared mailbox."
In other words:
@"email address of the shared mailbox",