Learning and Sharing
  • Home
  • Blog
  • Linux
  • macOS
  • Virtualization
    • VMware
    • VirtualBox
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server
  • Series
    • Symantec
    • Intune
    • Microsoft Azure
    • Powershell
    • VirtualBox
    • VMware
    • PowerShell Learning
    • Microsoft Graph
  • More
    • Auto Installation
    • AEC Installation
  • Contact
No Result
View All Result
  • Home
  • Blog
  • Linux
  • macOS
  • Virtualization
    • VMware
    • VirtualBox
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server
  • Series
    • Symantec
    • Intune
    • Microsoft Azure
    • Powershell
    • VirtualBox
    • VMware
    • PowerShell Learning
    • Microsoft Graph
  • More
    • Auto Installation
    • AEC Installation
  • Contact
No Result
View All Result
No Result
View All Result

How to Check SMTP AUTH is Enabled or Disabled in Microsoft 365

December 17, 2022
in Blog
0
ADVERTISEMENT

Table of Contents

Deprecation of Basic authentication in Exchange Online

In September 2021, Microsoft announced that effective October 1, 2022, they will begin disabling Basic authentication for Outlook, EWS, RPS, POP, IMAP, and EAS protocols in Exchange Online. SMTP Auth will also be disabled if it is not being used. See full announcement: Basic Authentication and Exchange Online – September 2021 Update.

The SMTP AUTH protocol is used for client SMTP email submission, typically on TCP port 587. In some cases, when you sent an email using SMTP Auth, you got the error:

Send-MailMessage : The SMTP server requires a secure connection, or the client was not authenticated. The server response was: 5.7.57 Client not authenticated to send mail. Error: 535 5.7.139 Authentication unsuccessful, SmtpClientAuthentication is disabled for the Tenant.

Disable or Enable SMTP AUTH in your organization

Microsoft highly recommend that you keep SMTP AUTH disabled in your organization. You should only enable it for the mailboxes that still require it.

1. Connect to Exchange Online PowerShell or you can open Windows PowerShell (Admin) then run below commands:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine -Force;
Install-PackageProvider -Name NuGet -Force;
Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted;
Install-Module -Name ExchangeOnlineManagement;
Import-Module ExchangeOnlineManagement;
Connect-ExchangeOnline;

2. Run the following command to check SMTP AUTH status:

Get-TransportConfig | Format-List SmtpClientAuthenticationDisabled

SmtpClientAuthenticationDisabled property is True means the SMTP AUTH is already disabled

PS C:\> Get-TransportConfig | Format-List SmtpClientAuthenticationDisabled

SmtpClientAuthenticationDisabled : True

3. Run the following command to enable SMTP AUTH:

Set-TransportConfig -SmtpClientAuthenticationDisabled $false

Note: To disable SMTP AUTH if it’s already enabled, use the value $true.

 

ADVERTISEMENT

Enable SMTP AUTH for specific mailboxes

Microsoft highly recommend that you disable SMTP AUTH in your Exchange Online organization, and enable it only for the accounts (that is, mailboxes) that still require it.

Note Note: You must disable Security Defaults in Azure Active Directory, when it enabled, it’ll disable basic authentication in whole tenant, and it overwrites all other settings. It means enable SMTP Authentication will not work.

1. Run the following command to enable SMTP Authentication for a specific mailbox.

Set-CASMailbox -Identity [email protected] -SmtpClientAuthenticationDisabled $false

2. To verify that you’ve enabled or disabled SMTP AUTH for a specific mailbox, you can check it through Microsoft admin center or using PowerShell.

PS C:\> Get-CASMailbox -Identity [email protected]  | FL SmtpClientAuthenticationDisabled

SmtpClientAuthenticationDisabled : False

Or you can use the following command with SmtpClientAuthenticationDisabled property:

  • False = Enable SMTP Authentication.
  • True = Disable SMTP Authentication.
  • blank = Use organization setting.
Set-CASMailbox -Identity [email protected] -SmtpClientAuthenticationDisabled
Set-CASMailbox -Identity [email protected] -SmtpClientAuthenticationDisabled $false
Set-CASMailbox -Identity [email protected] -SmtpClientAuthenticationDisabled $true

Alternatively, for individual mailbox in the Microsoft 365 admin center: 

Go to Users > Active users > Select the user > click Mail > click Manage email apps and verify the value of Authenticated SMTP (checked = enabled, unchecked = disabled).

Bg1170

To get all mailboxes where SMTP AUTH is enabled, run the following command:

$Users = Get-CASMailbox -ResultSize unlimited
$Users | where {$_.SmtpClientAuthenticationDisabled -eq $false} | 
Select-Object DisplayName,PrimarySmtpAddress
PS C:\Users\admin> $Users = Get-CASMailbox -ResultSize unlimited
PS C:\Users\admin> $Users | where {$_.SmtpClientAuthenticationDisabled -eq $false} |
>> Select-Object DisplayName,PrimarySmtpAddress

DisplayName PrimarySmtpAddress
----------- ------------------
Chris       [email protected]
David       [email protected]
Maria       [email protected]
Tonny       [email protected]

To get all mailboxes where SMTP AUTH is controlled by the organization setting, run the following command:

$Users = Get-CASMailbox -ResultSize unlimited
$Users | where {$_.SmtpClientAuthenticationDisabled -eq $null} | 
Select-Object DisplayName,PrimarySmtpAddress
PS C:\Users\admin> $Users = Get-CASMailbox -ResultSize unlimited
PS C:\Users\admin> $Users | where {$_.SmtpClientAuthenticationDisabled -eq $null} |
>> Select-Object DisplayName,PrimarySmtpAddress

DisplayName              PrimarySmtpAddress
-----------              ------------------
Bon Ben                  [email protected]
Anna                     [email protected]
Ben                      [email protected]
Chris                    [email protected]
...
ADVERTISEMENT
5/5 - (2 votes)
Previous Post

How to Fix Ubuntu Virtual Machine Cannot Full Screen in VirtualBox

Next Post

How to Disable Security Default in Microsoft 365 Exchange Online

Related Posts

Running Hyper-V and VMware Workstation on The Same Machine

August 15, 2024

How to Uninstall All Autodesk Products At Once Silently

July 29, 2024
Ftr5

How to Uninstall the Autodesk Genuine Service on Windows

July 29, 2024
Ftr19

How to Fix Windows Cannot Read the ProductKey From the Unattend Answer File in VirtualBox

July 26, 2024
Ftr25

How to Update Windows Terminal in Windows 10/11

July 26, 2024

How to Disable The Beep Sound in WSL Terminal on Windows

July 26, 2024

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • How To Turn On uBlock Origin Extension in Chrome (2025)
  • Images Hidden Due To Mature Content Settings In CivitAI
  • Azure OpenAI vs Azure AI Hub, How to Choose the Right One for Your Needs

Categories

Stay in Touch

Discord Server

Join the Discord server with the site members for all questions and discussions.

Telegram Community

Jump in Telegram server. Ask questions and discuss everything with the site members.

Youtube Channel

Watch more videos, learning and sharing with Leo ❤❤❤. Sharing to be better.

Newsletter

Join the movement and receive our weekly Tech related newsletter. It’s Free.

General

Microsoft Windows

Microsoft Office

VMware

VirtualBox

Technology

PowerShell

Microsoft 365

Microsoft Teams

Email Servers

Copyright 2025 © All rights Reserved. Design by Leo with ❤

No Result
View All Result
  • Home
  • Linux
  • Intune
  • macOS
  • VMware
  • VirtualBox
  • Powershell
  • Windows 10
  • Windows 11
  • Microsoft 365
  • Microsoft Azure
  • Microsoft Office
  • Active Directory

No Result
View All Result
  • Home
  • Linux
  • Intune
  • macOS
  • VMware
  • VirtualBox
  • Powershell
  • Windows 10
  • Windows 11
  • Microsoft 365
  • Microsoft Azure
  • Microsoft Office
  • Active Directory