When sending emails through a Microsoft 365 account (Shared Mailbox) within Business Central, enable the option to store the send mail in that shared mailboxes. Currently, due to the hardcoded GraphURLTxt + '/v1.0/me/sendMail' path in the EmailOutlookAPIClient.Codeunit.al, emails sent from Business Central (e.g., by the finance team when sending invoices) are saved in the personal "Sent Items" folder of the sender, not in the shared mailbox. This limitation restricts visibility and collaboration among team members relying on the shared mailbox for records like invoices, time tracking, and contract details.
Proposed Solution:
1. Configurable Shared Mailbox Usage:
- Add a setting in Business Central’s email configuration to specify whether emails should be sent via a personal or shared mailbox.
- When sending emails via a shared mailbox, update the RequestUri to GraphURLTxt + '/v1.0/users/{sharedMailboxEmail}/sendMail', allowing emails to appear in the shared mailbox’s "Sent Items."
2. Permissions Update:
- Ensure the app registration for Business Central SaaS includes the Mail.Send.Shared (Delegated) API permission. This permission allows the application to send emails from a shared mailbox, granting access to all authorized users to see the sent emails in the shared mailbox’s "Sent Items."
It seems I’m unable to modify this with a PTE copy of the "Email - Outlook REST API" app because its `target` is set to OnPrem.
This solution enables the finance team and other departments to use shared mailboxes effectively, improving collaboration and email record-keeping in there shared mailbox.
Comments
There was a lively discussion about this on Yammer (https://www.yammer.com/dynamicsnavdev/#/Threads/show?threadId=3039600681410560). Thanks to the helpful input from the Business Central community, it seems this idea is no longer necessary and can be closed. It turns out that there is a PowerShell cmdlet that enables this functionality for shared mailboxes. To implement it, you need to add the “Send As” permission to the shared mailbox in the Exchange Admin Center. However, this option isn’t available directly in the Exchange Admin Center interface. Instead, you need to connect to Exchange Online via PowerShell and enable the MessageCopyForSentAsEnabled setting for the shared mailbox (for example, invoices@contoso.com):Set-Mailbox invoices@contoso.com -MessageCopyForSentAsEnabled $trueFor more details, see the documentation: https://learn.microsoft.com/en-us/exchange/recipients-in-exchange-online/manage-user-mailboxes/automatically-save-sent-items-in-delegator-s-mailbox#how-do-i-set-up-a-mailbox-to-save-messages-sent-as-a-manager-when-theyre-sent-by-an-assistant
Category: Office Integration
Brilliant Idea.Related to this would be an option to connect a shared mailbox to incoming documents. This would only add email attachments with the email subject line. This would allow finance people to monitor the incoming docs & process - either manually creating transactions or sent to OCR service.
Category: Office Integration
Business Central Team (administrator)
Thank you for this suggestion! Currently this is not on our roadmap. We are tracking this idea and if it gathers more votes and comments we will consider it in the future. Best regards, Business Central Team