Shared Mailboxes in Outlook Extension

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TMAG_mbohlender
    Junior Member
    • May 2026
    • 6

    #1

    Shared Mailboxes in Outlook Extension

    Hi Community,

    there are already a few threads about this topic but none of them really meets what I wanted to discuss with you as the possible solution for the full fledged use of Shared Mailboxes. We already can use Shared Mailboxes from M365 as INBOXES without any problems, so first of all thanks for an excellent extension.

    When it comes to SENDING mails using a shared mailbox we run into severe limitations with the known workaround of sending with the personal mail or temporarily licencing the shared mailbox as a user. I investigated escpecially into the latter and it pointed me to the right direction as I think. Here is what I found when using Graph API for sending mails, SMTP is restricted too narrow here for me:

    The Microsoft GRAPH API has TWO endpoints for sending mail with fully different behaviour. The URI

    Code:
    POST /me/sendMail
    is strictly limited to the use for personal (and thus LICENCED !!!) mailboxes. This was the hint that I was missing. The second URI

    Code:
    POST /users/{id | userPrincipalName}/sendMail
    is for use with shared mailboxes where the placeholder ist then replaced with the mailadress of the Shared Mailbox, e.g. /users/forum@espocrm.com/sendMail.

    Unfortunately in one of the base configuration / properties file of the extension - do not remember exactly which one and cannot check while writing this ... - there is the FIRST Url hard coded as the base URL for the complete extension.

    I did not dive too deep into the code of the module but is there any way of "easily" implementing this logic:
    • if mail account is "Personal Mail Account" then use /me/SendMail as the baseURL
    • if mail account is "Group Mail Account" then use /users/{id | userPrincipalName}/sendMail as baseURL
    This would probably eliminate every problem we have with this. As far as I can see from here: user: sendMail - Microsoft Graph v1.0 | Microsoft Learn the headers and body payload are the same, so main point to take care of will be the construction of the URL

    What do you think, Yuri?

    Regards
    Michael
Working...