Network Management

How to configure SMTP using Microsoft Exchange Web Services (EWS) OAuth 2.0 or Exchange Online (part of Microsoft 365 Services)

This document outlines how to configure SMTP using Exchange Web Services (EWS) with OAuth2.0 (Modern Authentication).

First published date

5/30/2023 2:26 PM

Last published date

3/6/2026 4:22 PM

Overview

OAuth authentication for Exchange Web Services (EWS) is only available in Exchange Online as part of Microsoft 365. EWS applications that use OAuth must be registered with Azure Active Directory.

Product section

Network Performance Monitor

Cause

On October 1st, 2022, Microsoft began disabling Basic authentication in Microsoft 365 for EWS, IMAP, and POP3. This means that classic username/password authentication no longer works with Exchange Online, and the application has to be upgraded to use OAuth 2.0.

Resolution

Important! Microsoft has officially announced that on October 1, 2026, EWS request to Exchange Online will be blocked. The recommended path is to migrate to Microsoft Graph API.

 

Note:  In order to configure SMTP while following Microsoft best practices, please reference Limiting application permissions to specific Exchange Online mailboxes - Microsoft Graph | Microsoft Learn to properly limit permissions.

Starting in SolarWinds Platform 2023.2 and above , EWS OAuth 2.0 / OAuth 2.0 option was added.  To configure Oauth for SolarWinds Platform products, please refer to the following steps below:

 

  1. Register your application in Azure Active Directory
  2. Configure app-only authentication in Azure Active Directory (optional)
  3. Configure OAuth in the SolarWinds Platform Web Console

Register your application in the Azure Active Directory

To use OAuth, an application must have an application ID issued by Azure Active Directory. You will need to register your application as a public client with Azure Active Directory.

  1. Open a browser, navigate to the Azure Active Directory admin center, and log in.

  2. Select Azure Active Directory in the left-hand navigation, then select App Registrations under Applications.

    image.png

     

  3. Select New Registration. On the Register an application page, set the values as follows.

    1. Set the Name to a friendly name for your app.

    2. Set Supported account types to the choice that makes sense for your scenario.

    3. For Redirect URI, change the dropdown to Public client (mobile & desktop) and set the value to

       https://login.microsoftonline.com/common/oauth2/nativeclient

Configure for app-only authentication

To use application permissions, follow these additional steps.

  1. Select Manifest in the left-hand navigation under Manage.

  2. Locate the requiredResourceAccess property in the manifest, and add the following inside the square brackets ([]):

    {
        "resourceAppId": "00000002-0000-0ff1-ce00-000000000000",
        "resourceAccess": [
            {
                "id": "dc890d15-9560-4a4c-9b7f-a736ec74ec40",
                "type": "Role"}
        ]
    }

    Before

    After

  3. Select Save.

  4. Select API permissions under Manage. Confirm that the full_access_as_app permission is listed.

  5. Select Grant admin consent for org and accept the consent dialog.

  6. Select Certificates & Secrets in the left-hand navigation under Manage.

  7. Select New client secret, enter a short description, and select Add.

  8. Copy the Secret.

  9. Go to the Overview Section and copy the following items to the SolarWinds SMTP EWS Oauth settings:

    • Application (Client ID)

    • Directory (Tenant ID)

    • Client Secret

Configure OAuth in the SolarWinds Platform Web Console

  1. In the web console, go to Settings > All Settings > Manage SMTP Servers.

  2. Click ADD SMTP SERVER.

  3. Choose EWS OAuth 2.0.

  4. Enter the following:

    • For Hostname or IP Address, enter: smtp.office365.com

    • Client Secret

    • Application (Client ID)

    • Directory (Tenant ID)







      If error is encountered:

      Email can't be received because the license is invalid for the mailbox <Mailbox Name>.
      Email Server Error Code: ErrorInvalidLicense 

      Solution:
      https://learn.microsoft.com/en-us/troubleshoot/dynamics-365/sales/email-cannot-be-received-because-license-is-invalid-error#cause