Office 365 Auth



-->

Client SMTP email submissions (also known as authenticated SMTP submissions) are used in the following scenarios in Office 365 and Microsoft 365:

Feb 05, 2021 We previously announced we would begin to disable Basic Auth for five Exchange Online protocols in the second half of 2021. Due to the pandemic and the effect it has on priorities and work patterns, we are announcing some important changes to our plan to disable Basic Auth in Exchange Online. By setting up MFA, you add an extra layer of security to your Microsoft 365 account sign-in. For example, you first specify your password and, when prompted, you also type a dynamically generated verification code provided by an authenticator app or sent to your phone.

  • POP3 and IMAP4 clients. These protocols only allow clients to receive email messages, so they need to use authenticated SMTP to send email messages.
  • Applications, reporting servers, and multifunction devices that generate and send email messages.

Paul Andrew is a technical product manager on the Office 365 team working on identity. Today we’re adding Multi-Factor Authentication for Office 365 to Office 365 Midsize Business, Enterprise plans, Academic plans, Nonprofit plans, and standalone Office 365 plans, including Exchange Online and SharePoint Online. By setting up MFA, you add an extra layer of security to your Microsoft 365 account sign-in. For example, you first specify your password and, when prompted, you also type a dynamically generated verification code provided by an authenticator app or sent to your phone.

Note

As of February 2020, OAuth authentication is available for POP3, IMAP4, and SMTP AUTH connections to Exchange Online. For more information, see Authenticate an IMAP, POP or SMTP connection using OAuth.

The SMTP AUTH protocol is used for client SMTP email submission, typically on TCP port 587. SMTP AUTH supports modern authentication (Modern Auth).

Office 365 Auth

Virtually all modern email clients that connect to Exchange Online mailboxes in Office 365 or Microsoft 365 (for example, Outlook, Outlook on the web, iOS Mail, Outlook for iOS and Android, etc.) don't use SMTP AUTH to send email messages.

Therefore, we 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. There are two settings that can help you do this:

  • An organization-wide setting to disable (or enable) SMTP AUTH.
  • A per-mailbox setting that overrides the tenant-wide setting.

Office 365 Authentication C#

Note that these settings only apply to mailboxes that are hosted in Exchange Online (Office 365 or Microsoft 365).

Note

  • If you've enabled security defaults in your organization, SMTP AUTH is already disabled in Exchange Online. For more information, see What are security defaults?.

  • If your authentication policy disables basic authentication for SMTP, clients cannot use the SMTP AUTH protocol even if you enable the settings outlined in this article. For more information, see Disable Basic authentication in Exchange Online.

Disable SMTP AUTH in your organization

You can only disable (or enable) SMTP AUTH globally for your organization by using Exchange Online PowerShell.

To disable SMTP AUTH globally in your organization, run the following command:

Note: To enable SMTP AUTH if it's already disabled, use the value $false.

How do you know this procedure worked?

To verify that you've globally disabled SMTP AUTH in your organization, run the following command and verify that the value of the SmtpClientAuthenticationDisabled property is True:

Enable SMTP AUTH for specific mailboxes

The per-mailbox setting to enable (or disable) SMTP AUTH is available in the Microsoft 365 admin center or Exchange Online PowerShell.

Use the Microsoft 365 admin center to enable or disable SMTP AUTH on specific mailboxes

  1. Open the Microsoft 365 admin center and go to Users > Active users.

  2. Select the user, and in the flyout that appears, click Mail.

  3. In the Email apps section, click Manage email apps.

  4. Verify the Authenticated SMTP setting: unchecked = disabled, checked = enabled.

  5. When you're finished, click Save changes.

Use Exchange Online PowerShell to enable or disable SMTP AUTH on specific mailboxes

Use the following syntax:

The value $null indicates the setting for the mailbox is controlled by the global setting on the organization. You use the values $true (disabled) or $false (enabled) to override the organization setting. The mailbox setting takes precedence over the organization setting.

This example enables SMTP AUTH for mailbox sean@contoso.com.

This example disables SMTP AUTH for mailbox chris@contoso.com.

Office 365 Authoritative Vs Internal Relay

Use Exchange Online PowerShell to enable or disable SMTP AUTH on multiple mailboxes

Use a text file to identify the mailboxes. Values that don't contain spaces (for example, alias, email address, or account name) work best. The text file must contain one mailbox on each line like this:

Office 365 Auth0

akol@contoso.com
tjohnston@contoso.com
kakers@contoso.com

The syntax uses the following two commands (one to identify the mailboxes, and the other to enable SMTP AUTH for those mailboxes):

This example enables SMTP AUTH for the mailboxes specified in the file C:My DocumentsAllow SMTP AUTH.txt.

Note

To disable SMTP AUTH for the mailboxes, use the value $true. To return control to the organization setting, use the value $null.

How do you know this worked?

Office 365 Authentication Methods

To verify that you've enabled or disabled SMTP AUTH for a specific mailbox, do any of the following steps:

  • 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).

  • Individual mailboxes in Exchange Online PowerShell: Replace <MailboxIdentity> with the name; alias; email address or account name of the mailbox; run the following command; and verify the value of the SmtpClientAuthenticationDisabled property (False = enabled, True = disabled, blank = use organization setting).

  • All mailboxes where SMTP AUTH is disabled: Run the following command:

  • All mailboxes where SMTP AUTH is enabled: Run the following command:

  • All mailboxes where SMTP AUTH is controlled by the organization setting: Run the following command: