Greetings!
I have a question, is it possible to utilize Microsoft 365 / Exchange Online shared mailboxes in IMAP/SMTP automations, in conjunction with OAuth? This question applies to System Email as well.
All our research points towards no at the moment, so this might be an Idea post rather than a Question. At least within FME Flow 2024.1.3 (Build 24627) that we are currently running.
Background:
Exchange Online shared mailboxes cannot be interacted with directly. Their accounts are technically disabled, they have no valid logon credentials nor any mailbox licenses. Instead, you grant Send as and Full permission to other licensed accounts in Exchange Online, who act on behalf of the shared mailboxes.
Therefore, in addition to the shared mailbox (fme@our-company.com) we intend to use for automations, we created a licensed service account (account@our-microsoft-tenant.com) that will act on behalf of the shared mailbox.
The problem:
Now, provided that all we have for Email automations is a single IMAP/SMTP Account field, how do we authenticate the licensed service account and specify the shared mailbox at the same time? Back in the days of Basic Authentication, there was an obscure yet simple way to accomplish this:
IMAP/SMTP Account: account@our-microsoft-tenant.com\[shared mailbox GUID]
Password: [the password for account@our-microsoft-tenant.com]
This account syntax (we tried different combinations of single/double forward and backward slash) however no longer works in conjunction with OAuth. We have successfully authenticated the licensed service account in our tests, but cannot act on behalf of the shared mailbox.
Microsoft does support IMAP/SMTP access to shared mailboxes with OAuth (https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth), but this might require client-side implementation, which may or may not be present in FME Flow:
In case of shared mailbox access using OAuth, an 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 conclusion:
Is there anything obvious I might have missed here, that supports our use case? Or do we have to utilize a user mailbox instead, if shared mailboxes with OAuth are unsupported by FME Flow?