Skip to main content

Please note that Microsoft will be turning off EWS access for all non-Microsoft apps starting October 1st, 2026. For more information see here: Retirement of EWS

Connection - Exchange EWS​

The Exchange EWS Connection stores the address, sign-in and security settings that the Email - Send Task, the Email - Get Messages, Email - Get Single Message, Email - Get Headers, Email - Delete Messages, Email - Delete Single Message and Email - Move Messages Tasks and the Email Trigger use to connect to Microsoft Exchange.

The email receiving Tasks and the Email Trigger read email through Exchange Web Services (EWS). The Email - Send Task sends email, and the Email Trigger forwards matching email, through this Connection.

To read and send Exchange Online email through Microsoft Graph, see Connection - Microsoft Graph API.

Common settings​

Exchange EWS Connection, Common settings tab with the Protocol and Information groups

The Common settings and Proxy tabs are the same for every Connection type that has them; see Common settings and Proxy.

Test

Opens the Test SMTP Connection window. Enter an address in From email and in To email, then click Test. The Server sends a real message through this Connection, with the subject "Test subject (from VisualCron)", to the To email address. Test checks sending only; it does not read the mailbox.

Main settings​

These fields are on Connection settings -> Main settings.

The Connection settings tab holds three tabs: Main settings, Encryption and Proxy. The fields on Main settings depend on Authentication type: "Default", "OAuth" or "Certificate". Address, Port and the first credential field must be filled in for every type.

Default​

Exchange EWS Connection, Main settings tab with Default authentication

Address

The URL of the EWS service. Here is how you can obtain it:

For Microsoft Exchange Online / Office 365

  • Access your journaling mailbox account using Outlook Web App (OWA)
  • Click Options > See All Options > Account > My Account > Settings for POP, IMAP, and SMTP access
  • In the list of entries, locate the server name. The URL of exchange web service for the mailbox is the URL: https://<ONLINE_URL>/EWS/Exchange.asmx

For Microsoft Exchange Server (on-premises)

The URL has the form https://<Exchange server host name>/EWS/Exchange.asmx. To read it in the Exchange Management Shell, run this command:

Get-WebServicesVirtualDirectory | Select name, *url* | fl

The output is similar to this:

Name : EWS (Default Web Site)
InternalNLBBypassUrl : https://<server name>/ews/exchange.asmx
InternalUrl : https://<server name>/EWS/Exchange.asmx
ExternalUrl : https://<external host name>/ews/exchange.asmx

Port

The port of the EWS service. A new Connection opens with "21" in Port. Change it to the port of the Exchange server, usually "443". Port cannot be "0". For an "https" address, select "SSL" or "TLS" on the Encryption tab. With "No encryption", the Server reads email without encryption.

Authentication type

  • "Default": the user name and password of the mailbox account
  • "OAuth": an app registration with a client secret, for Exchange Online
  • "Certificate": an app registration with a certificate, for Exchange Online

Anonymous

Shown only with "Default". When selected, Username and Password are unavailable, and the Email - Send Task sends email without logging on. The email receiving Tasks and the Email Trigger do not use Anonymous. They always log on with Username and Password.

Username

The user name of the mailbox account. Required.

Password

The password of the mailbox account.

Alias

The mailbox to open when it is not the mailbox of Username, for example a shared mailbox. The email receiving Tasks and the Email Trigger use it.

OAuth​

Exchange EWS Connection, OAuth authentication fields

The screenshot shows an earlier layout of the window. In the current Client, the OAuth fields are on Main settings, and the App settings group replaces the Extra settings tab.

With "OAuth" and "Certificate", the Server connects to Exchange Online. It does not use Address or Port, but both fields must still be filled in. Both types need an app registration in Microsoft Entra ID (Azure Active Directory); see Set up the EWS app in Microsoft Entra ID.

Application Id

The Application (client) ID of the app registration.

Client secret

A client secret of the app registration.

Email

The address of the mailbox to work with.

Setup app

Opens the App registrations page of the Azure portal in the web browser.

Authenticate

Opens the Microsoft sign-in page in the web browser. Click Authenticate once before you use the Connection: the email receiving Tasks and the Email Trigger need the saved sign-in.

When a Task or the Email Trigger runs, the Server signs in as the app itself, with Application Id, Client secret and the Tenant Id in App settings. To read email, the app therefore needs the full_access_as_app application permission with admin consent. To send email, the Email - Send Task connects to the Exchange Online host "smtp.office365.com" on port "587", signed in as the app, and the app also needs permission to send as the mailbox.

Certificate​

The same as "OAuth", except that the app signs in with a certificate instead of a client secret:

  • Application Id: the Application (client) ID of the app registration
  • Certificate Id: not used by the Server; the Server uses the certificate selected in Certificate
  • Email: the address of the mailbox to work with
  • Certificate: the certificate, with its private key, from Certificates; upload its public key to the app registration

Click Authenticate once before you use the Connection.

Encryption​

Exchange EWS Connection, Encryption tab with the SSL/TLS, Allowed SSL/TLS versions and SASL Mechanisms groups

The settings on this tab are used with "Default" authentication. With "OAuth" and "Certificate", the mail connection does not use them, but the Email Trigger still sets the SSL and TLS versions for the whole Server process from them, as described under Allowed SSL/TLS versions.

Cryptographic protocol

  • "No encryption": the connection is not encrypted; the Allowed SSL/TLS versions group is unavailable
  • "SSL": SSL encryption; selects SSL version 2 and SSL version 3 in Allowed SSL/TLS versions
  • "TLS": TLS encryption; selects TLS version 1 to TLS version 1.3 in Allowed SSL/TLS versions

The email receiving Tasks and the Email Trigger use Cryptographic protocol when they read email. The Email - Send Task and Test do not use Cryptographic protocol or Allowed SSL/TLS versions when they send email.

Allowed SSL/TLS versions

The available versions are SSL version 2, SSL version 3, TLS version 1, TLS version 1.1, TLS version 1.2 and TLS version 1.3. The email receiving Tasks do not read these boxes. When the Email Trigger checks the mailbox, the Server first sets the SSL and TLS versions for the whole Server process from them:

  • "TLS": the selected boxes among TLS version 1, TLS version 1.1 and TLS version 1.2, or all three when none of them is selected; never TLS version 1.3
  • "SSL" with SSL version 3 selected: the system default versions
  • "SSL" with SSL version 3 cleared: SSL version 3 only

With "SSL" and SSL version 3 cleared, the whole Server process is limited to SSL 3, and other Tasks that connect over HTTPS can then fail.

note

Each time you open an existing Exchange EWS Connection, the version boxes reset to the defaults of the selected protocol. Check them before you click OK.

SASL Mechanisms

Used by the Email - Send Task when it sends email with "Default" authentication and Anonymous cleared. The Email - Send Task uses one mechanism: NTLM when it is selected, otherwise CRAM-MD5 when it is selected. When both are cleared, the Email - Send Task does not set a mechanism, and one is chosen automatically. All three boxes are selected on a new Connection, so a new Connection sends with NTLM. DIGEST-MD5 is not used on its own.

Proxy​

Exchange EWS Connection, Proxy tab

When the Server reads email, it uses Proxy type, Address and Port and, when Use credentials is selected, Username and Password. It does not use Authentication or Domain. When the Server sends email, from the Email - Send Task, the Email Trigger forward action or Test, it does not use the settings on this tab.

App settings​

Exchange EWS Connection, App settings fields

The App settings group is shown on Main settings with "OAuth" and "Certificate". The screenshot shows it on the former Extra settings tab.

Tenant Id

The Directory (tenant) ID of the app registration. Required: the Server uses it to sign in as the app.

Tenant Primary Domain

The primary domain of the tenant. When it is filled in, Authenticate signs in through this tenant instead of the common Microsoft sign-in page.

Tenant Name

Not used by the Exchange EWS Connection.

Redirect Url

The redirect URI of the app registration, for example "http://localhost:9999". Authenticate receives the sign-in reply at this address on the computer that runs the Client. Required for Authenticate.

Auto-accept server certificates

Not used by the Exchange EWS Connection.

Set up the EWS app in Microsoft Entra ID​

"OAuth" and "Certificate" need an app registration in Microsoft Entra ID (Azure Active Directory). To create it, complete the following steps:

  1. Sign in to the Azure portal.

  2. Open Microsoft Entra ID.

  3. Select App registrations.

  4. Select New registration.

  5. In Name, enter a name for the app.

  6. Under Supported account types, select the option that covers the directory of the mailboxes, usually Accounts in this organizational directory only.

  7. Under Redirect URI, select Web.

  8. In the redirect URI box, enter the Redirect Url value of the Connection, for example "http://localhost:9999".

  9. Click Register.

  10. On the Overview page of the app, copy Application (client) ID into Application Id in the Connection.

  11. Copy Directory (tenant) ID into Tenant Id in the Connection.

  12. Select Certificates & secrets.

  13. For "OAuth", add a new client secret.

  14. For "OAuth", copy the Value of the new secret into Client secret in the Connection. The portal shows the value only once, right after you add the secret.

  15. For "Certificate", upload the public key of the certificate.

  16. Select API permissions.

  17. Add the full_access_as_app application permission of Office 365 Exchange Online.

  18. Add the EWS.AccessAsUser.All delegated permission of Office 365 Exchange Online, which Authenticate requests.

  19. Select Grant admin consent for your directory.

The app registration can now read email through the Connection. Fill in the Connection, then click Authenticate. Microsoft Graph permissions are not used by this Connection.