Office 365 shared mailboxes with Microsoft 365 Channel (APP/OAuth)

At the moment we use shared mailboxes together with a service account via IMAP:
- host: outlook.office365.com
- user: my-email-serviceaccount@tld.de\sharedmailbo-xalias
- …
(see also [solved] Adding Office 365 shared Mailbox)

As basic authentification will be deactivated in the near future, today I tried to setup a Microsoft 365 channel, as described in the docs.

It actually works for the service account, but I am not able to define the shared mailbox.

I cannot login in the “IMAP way” with my-email-serviceaccount@tld.de\sharedmailbo-xalias and if I only use the service account, Zammad connects directly to the mailbox of the service account and not the shared mailbox.

It would be great to get the option to set oder select a shared mailbox.

Best regards,
Jan

To the best of my knowledge, the / method doesn’t work in other situations.
i thought that it should be configured as, i want to poll email address x, and i use credentials email address y to connect to it.
Not entirely sure, and not sure how and if this works in zammad.

Unable to make a test for you.


No zammad expert, just trying to help.

Yes, Zammad would need to make available and use an optional separate “mail account field”.

For shared mailboxes the needed method is:

S = Shared Mailbox name, e.g. shared@example.tld
U = User who has full access to shared mailbox S, e.g. , e.g. bob@example.tld

  1. Get Access Token for User U.
  2. Open an IMAP connection using Username S, but access token obtained for User U in step 1

Taken from Access shared/delegate mailbox of Office 365 | Blog | Limilabs

Currently, Zammad uses user name U in step 1 and 2 with no way to change it in step 2.