Exchange Shared Mailboxes --- Authenticating with username

I am using Office 365 Business for email (exchange) and I have a few “shared mailboxes” setup that I would like to utilize in erpNext.

I am able to access them in email clients by utilizing the “username” field to pass both the user’s email followed by “\” and then the shared mailbox. This authenticates and then uses the shared mailbox.

example:
username: real.mailbox@domain.com\shared.mailbox@domain.com

Full example that works both in Thunderbird, Outlook and Apple Mail app:

User Mailbox:   smith@domain.com
Shared Mailbox:    info@domain.com


IMAP Settings:
     username:      smith@domain.com\info@domain.com   (user mailbox \ shared mailbox)
     password:      user mailbox password     --  smith@domain.com's account password
     server:            outlook.office365.com

SMTP
     username:  smith@domain.com          -- main mailbox 
     password:    user mailbox password   --  smith@domain.com's account password
     server:  smtp.office365.com

Any suggestions would be appreciated on how to go about making changes that will allow this to work.

First you must make sure that the proxy user has full mailbox rights to the shared mailbox and full send as rights in Office365 then go in and setup email domain in ERPNext:

Then the email account:


I double checked, and I have full rights to the mailbox. This proves true in Apple Mail, Thunderbird etc.

I tried to set up the way you have it the very first time, it authenticates and will send email as the shared mailbox, but if you try to pull mail, it pulls from the logged in email, meaning it pulls from the primary address.

When I set up Apple Mail, Thunderbird etc using the method I mentioned above, it will send and only pull/show email for the shared mailbox.

Here is some instructions showing how I got it to set up to send and receive only from the shared mailbox. But I can’t get the username format to work in erpNext

Check out:

I can confirm that this does occur filed a ticket here:
https://github.com/frappe/erpnext/issues/13327

Thank you