Loading

EWS Utility for Debugging Lightning Sync Service Account Authentication Issues

Veröffentlichungsdatum: May 11, 2026
Beschreibung

Exchange Web Services (EWS) is a Microsoft API used by Lightning Sync to communicate with Microsoft Exchange servers. Lightning Sync is a legacy Salesforce feature — now replaced by Einstein Activity Capture — that synchronized contacts and calendar events between Salesforce and Microsoft Exchange or Office 365.
Some customers may experience Lightning Sync service account authentication failures where the service account cannot connect. To debug this issue, customers may need to run the EWS Utility in their environment and share the diagnostic results with Salesforce Support.
Prerequisite: To run the EWS Utility, the latest Java Runtime Environment (JRE) must be installed on your machine (PC or Mac). Java is a free software platform required to run Java-based tools. You can verify your Java version by typing java -version at the Command Prompt or Terminal.

Lösung

Send the EWS Utility download link (available at the bottom of this article) to the customer and have them follow the steps below.
Step 1 — Create a working directory
Create a new folder on the computer, for example: C:\ExchangeSyncLogs (Windows) or ~/ExchangeSyncLogs (Mac).
Step 2 — Download and extract the EWS Utility
Download and extract the EWS Utility to the new folder created in Step 1.
Step 3 — Open Command Prompt as Administrator
Click Start, type CMD, right-click cmd.exe, and select Run as administrator.
Step 4 — Navigate to the working directory
In Command Prompt, type CD \ExchangeSyncLogs and press Enter.
Step 5 — Run the diagnostic command
The following command runs the EWS diagnostic utility. It uses Java to execute the EWSTest JAR file (a self-contained Java application). Replace the placeholder values with your actual credentials before running:
java -cp ./EWSTest-0.9.222-1-jar-with-dependencies.jar test.exchange.AutoDiscoveryTest -username serviceAccount@domain.com -passwd password -impUsername targetMailbox@domain.com > testResults.txt 2>&1
Replace parameters as follows:

  • -username — Your Exchange service account email address
  • -passwd — Your service account password
  • -impUsername — The target mailbox email address you are testing impersonation for

Step 6 — Retrieve the log file
The command generates a log file saved as testResults.txt in C:\ExchangeSyncLogs. Please allow a few minutes for the command to complete.
Step 7 — Share results with Salesforce Support
Provide the testResults.txt file and the command you used. Important: Replace your actual password in the command with a placeholder such as xxxx before sharing.
Notes:

  • Always download a fresh copy of this tool using the link below each time you need to run it. Do not reuse a previously downloaded version.
  • You must use the latest version of Java. The tool may not function correctly with older versions.
  • Ensure the filename in the Java command matches the downloaded file name exactly.
Nummer des Knowledge-Artikels

000387671

 
Laden
Salesforce Help | Article