How to Enable SMTP Authentication for Office 365 to Send Emails via SMTP

10 May, 25 | Aakash Chavhan | 25 | 0 |  0 |  0

If you need to send emails using Office 365 SMTP credentials (e.g., from a website, app, or third-party email client), you must ensure certain settings are correctly configured both in Microsoft 365 and Azure. This guide walks you through the complete set

🧰 Prerequisites

Before starting, ensure you have:

  • Admin access to Microsoft 365
  • Access to the Azure Portal
  • Windows PowerShell installed

🔧 Step 1: Configure Exchange Online Settings via PowerShell

  1. Open PowerShell as Administrator and run the following commands in order:

    Install-Module -Name ExchangeOnlineManagement Import-Module ExchangeOnlineManagement Set-ExecutionPolicy Unrestricted
  2. Connect to Exchange Online:

    Connect-ExchangeOnline
  3. Check if SMTP Client Authentication is Disabled for the user (replace with the actual mailbox):

    Get-CASMailbox -Identity pricing@prilpl.com | Format-List SmtpClientAuthenticationDisabled
  4. Enable SMTP Client Authentication (if it is currently disabled):

    Set-CASMailbox -Identity pricing@prilpl.com -SmtpClientAuthenticationDisabled $false
  5. Verify the current transport configuration:

    Get-TransportConfig | Format-List AllowLegacyTLSClients
  6. Allow legacy TLS clients (this may be needed if you're using older libraries or systems):

    Set-TransportConfig -AllowLegacyTLSClients $true

🔐 Step 2: Disable Security Defaults in Azure AD

  1. Log in to the Azure Portal with your admin credentials.

  2. Navigate to Azure Active Directory from the left-hand menu.

  3. Go to "Properties" within Azure AD.

  4. Scroll down and click "Manage Security Defaults" at the bottom.

  5. In the pane that appears, set "Enable Security defaults" to No.

  6. Click Save to apply the changes.


✅ You’re All Set!

With these configurations in place, you can now authenticate and send emails using Office 365 SMTP settings. These steps are essential, especially if you're integrating Office 365 with custom applications or legacy systems that rely on SMTP for email dispatch.





Contact Us
COMMENTS

No comments