How to Check SMTP AUTH is Enabled or Disabled in Microsoft 365
Disable or Enable SMTP AUTH in your organization
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.
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: You must disable Security Defaults in Azure Active Directory, when it enabled, it’ll disable basic authentication in whole tenant and it overwrites all others settings. It means enable SMTP AUTH for specific mailboxes will not work.
Set-CASMailbox -Identity maria@leoguides.me -SmtpClientAuthenticationDisabled $false
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.
Individual mailboxes 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).
Or you can using the following command with SmtpClientAuthenticationDisabled property (False = enabled, True = disabled, blank = use organization setting).
PS C:\> Get-CASMailbox -Identity maria@leoguides.me | Format-List SmtpClientAuthenticationDisabled
SmtpClientAuthenticationDisabled : False
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 | where {$_.SmtpClientAuthenticationDisabled -eq $false} | Select-Object DisplayName,PrimarySmtpAddress
DisplayName PrimarySmtpAddress
----------- ------------------
Chris chris@leoguides.me
Maria maria@leoguides.me
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 = Get-CASMailbox -ResultSize unlimited
PS C:\> $Users | where {$_.SmtpClientAuthenticationDisabled -eq $null} | Select-Object DisplayName,PrimarySmtpAddress
DisplayName PrimarySmtpAddress
----------- ------------------
Bon Ben admin@bbguides.onmicrosoft.com
Anna anna@leoguides.me
Tom tom@leoguides.me
Tonny tonny@leoguides.me
0 comments:
একটি মন্তব্য পোস্ট করুন