We followed https://docs.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth to access a shared mailbox using IMAP protocol. We have a user account and a shared mailbox which belongs to same mail-enabled security group.
Scenario 1(Works): Add the group as member of shared mailbox with full access. The user account is able to access the shared mailbox using IMAP with Basic Authentication.
Scenario 2:(Doesn't work) Add the group as member of shared mailbox with full access. The user account is NOT able to access the shared mailbox using IMAP with Oauth Access Token.
Scenario 3(Works): Add the user account directly as a member of shared mailbox. The user is able to access the mailbox using IMAP with both Basic and Oauth.
Why isn't scenario 2 not working given that the user account has access to the mailbox via the group?