[EWS]Using Oauth authentication with EWS in Office 365

I’m sharing a PowerShell script sample that illustrates using Oauth authentication via Azure Active Directory (AAD) and EWS to connect to Office 365 mailbox. The script outputs the total item count in Inbox folder and prints the subject of the last five items in Inbox. The authorization grant flow used is Authorization code grant flow…


[EWS]How To enable EWS request and response tracing in PowerShell script using EWS Managed API?

Most of the time we need to review the request and response logs when troubleshooting any application/script which is utilizing the Exchange Web Services. Although setting the TraceEnabled flag to true on the ExchangeService object outputs the trace to the PowerShell window, there is no easy way to copy the trace to a file. Below…