Just to clarify/reiterate, it IS possible to access Shared Mailboxes via osTicket using oauth2.
You have to create a password for these mailboxes (by resetting the shared mailbox user's password as @AKBOVG mentioned above) and then follow osTicket's instructions on how to authenticate a Microsoft account via oauth2.
I'm posting this because at first I thought @KevinTheJedi 's last post ("you have to convert them to real accounts") meant you have to buy a license for them and convert them to proper mailboxes, so I spent a few hours trying to find another solution. But that's not the case, you just have to setup a password for them by resetting it.
PS. While trying to find other solutions, I edited "/include/class.email.php" and temporarily hardcoded "$vars['resource_owner_email']" (in the "updateOAuth2AuthCredentials" function) to be my shared mailbox email. So, after authentication with my personal email, the token was created using the shared mailbox and this also worked. Another solution would therefore be for osTicket to provide a "shared mailbox" checkbox and text field and use the shared mailbox email to create the token. Not really necessary as long as the password solution works, but I thought I'd mention it.