[EWS]Using Oauth authentication with EWS and impersonation in Office 365

Earlier I shared the sample script for consuming EWS using Oauth (via Azure Active Directory (AAD)) in a delegation mode. Here I’m sharing a sample PowerShell script that illustrates using Oauth authentication with EWS and impersonation to access mailboxes with an app token. The script accesses the mailboxes with email addresses presented in a text…


[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…


NO TO MULTIPLE BODIES ON A MESSAGE!

Recently I came across a case where the requirement was to send an email (using Outlook Object Model) consisting of both HTML and Plain Text body, with the idea being that, based on the View set in outlook, the appropriate body will be chosen. The cause for setting multiple bodies was that, when an email…


[EWS]How to retrieve the OOF (Out Of Facility) settings/message using EWS for an Exchange user?

Technorati Tags: EWS,Exchange 2010,GetMailTips,GetUserOofSettings,Out of Facility,Out of Office,EWS Managed API,Exchange 2013,Exchange Online,Exchange Web Services,DevMsg,HTTP EWS SOAP request Our customers have a common ask wherein they would like to check if the organization’s employees are available in office or out of office on a given day. With Exchange Web Services (EWS) being the flagship API for…