I've a shared mailbox with the similar configuration as provided in the question. But instead of user being directly added to the shared mailbox as a member(to receive/send emails), we have a mail-enabled security group added as a member. The user and the shared mailbox both belong to the same security group.
The IMAP fails with Oauth in this case. Basic auth works just fine. Also, If I add the user directly as a member, IMAP with oauth access token works fine.
Why isn't the oauth access token working if the group is added to the mailbox as a member instead of the user.
We're receiving the below error:
User is authenticated but not connected.