Using my own account as sender (From:) as well as recipient (To:), after authenticating myself everything works smoothly.
However, I would like to use a shared mailbox as sender instead of my own account.
I gave that mailbox permission to the Azure application; then I went back to Veeam console, changed the sender to the shared mailbox, and tried to re-authenticate.
- On the 1st try, I faced with VBR asking me to authenticate to Microsoft as the shared mailbox; a (unlicensed) shared mailbox does not have a login/password, so it could not work.
- On the 2nd try, I gave myself SendAs permission on the shared mailbox (which is how this is dealt with in applications like Outlook) and authenticate to Microsoft as myself; but when I was granted the permission, as I went back to the console, I found the From: field was changed back to myself, which is not what I was asking for.
- On a 3rd try, I unlocked the shared mailbox account on Exchange online (giving it a password), and then I was able to successfully login at Microsoft, and the test email went smoothly with the shared mailbox as sender; however to comply with the terms of Exchange, I should assign a license to that mailbox, making it essentially a regular mailbox, and it was not my initial intent doing so.
Alternatively, since the workflow on the 2nd try appears to work, why is the console resetting the From: field?
It should be possible to operate as some licensed account with registered login rights and SendAs or SendOnBehalf permission on a (different) sender? I do not know enough of OAuth to describe exactly how it should work, but at least Microsoft general documentation about Graph API explains it should be possible.