Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

SMTP Email sending using Multi-Tenant Environment

(1) ShareShare
ReportReport
Posted on by 79
Hi,
 
I have a situation where the customer has several tenants as follows:
 
Tenant A - used for managment of Office 365, Exchange, etc.
Tenant B - used for Business Central.
 
The users from Tenant A, have been invited as Guests to Tenant B and given licenses to Business Central.
 
When we have attempted to setup SMTP emails this doesn't seem to work due to authentication issues. We get the following error:
The SMTP server rejected the authentication request, as the authentication data is incorrect. Verify that your Username and Password are correct and that the SMTP server supports the specified authentication type (OAuth 2.0). SMTP error code: 535.
 
I have done some research online but the only answers we have found are to do with on-premise installations not on the cloud.
 
Has anyone done this before? If so, what setup needs to be in place to make this possible please?
 
Thanks,
 
Vaseem
Categories:
  • Kelsey Profile Picture
    18 on at
    SMTP Email sending using Multi-Tenant Environment
    Vaseem
    Thank you very much for sharing your findings. Our client is facing the similar scenario. I also tested and confirmed basic authentication works. Since OAuth 2.0 is a more secure way, I would like to find out if it is possible to configure SMTP with OAuth 2.0 for a multi-tenant environment. May I know if you may be aware of any update from Microsoft and see if OAuth 2.0 can be used? 
  • Verified answer
    Vaseem Ali Profile Picture
    79 on at
    SMTP Email sending using Multi-Tenant Environment
    I can confirm I have this working now.
     
    The setup required is a follows:
     
    1. In a Multi-tenant environment you have to use SMTP. The Office 365 and Shared Mailbox options will not work.
    2. When setting up the SMTP you need to use Basic Authentication. This is obviously less secure so not all customers will want to do this.
    3. When using this option you need to set a Password. The password is not your normal Office 365 password but an App Password. This can be setup in your Office 365 account.
     
    There maybe other considerations here for the Office 365 tenant as there could be Group Policies, Security Groups, etc blocking the Basic Authentication. However as long as there is nothing stopping this it will send.
     
    I believe this option would also work in those scenarios where a users do not have Office 365 accounts, such as Gmail, Yahoo, etc.
  • Vaseem Ali Profile Picture
    79 on at
    SMTP Email sending using Multi-Tenant Environment
    Thanks will give shared mailboxes a go.
     
    Do you have any recommendations on what authentication we should use for the Shared Mailboxes?
  • Suggested answer
    Inge M. Bruvik Profile Picture
    32,718 Moderator on at
    SMTP Email sending using Multi-Tenant Environment
    I think it should be possible to get it to work.
    What I first would do is to try to use a shared mailbox and see if you get that to work if you already have not tried that?
  • Vaseem Ali Profile Picture
    79 on at
    SMTP Email sending using Multi-Tenant Environment
    Hi,
     
    Not sure this is the answer as the users are Guests. They aren't Delegated Admin nor are they External Accountants. We also need to consider he scenarios whereby they don't have Office 365, what if they had Gmail, Yahoo, etc. How would that work?
     
     
    This suggests it could work with App Passwords and Basic auth still but I've yet to get it working.
     
    Thanks,
     
    Vaseem 
  • Suggested answer
    YUN ZHU Profile Picture
    62,477 Moderator on at
    SMTP Email sending using Multi-Tenant Environment
    Hi, unfortunately, this is mentioned in Microsoft's documentation.
    External users, such as delegated admins and external accountants, cannot use these extensions to send email messages from Business Central.
     
    Hope this helps.
    Thanks.
    ZHU

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard > Small and medium business | Business Central, NAV, RMS

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans