EWS Managed API Trace Listener

MSDN has some sample code showing how to implement a trace listener for the EWS Managed API (which is crucial for debugging EWS applications).  However, the sample trace listener isn’t actually very good for a variety of reasons (it creates different files for each trace type, and will actually overwrite the previous trace if the…


PowerShell/EWS: Searching for and deleting duplicate mailbox folders

We’ve had some cases recently where an issue with migration has caused the migrated mailbox to contain duplicate folders (e.g. there may be two Calendar folders).  I have written a script that can process mailboxes and automatically remove duplicate folders.  In the case of special folders (Inbox, Sent Items, etc.) the correct folder will be…


PowerShell: Remove duplicate calendar appointments

We regularly get requests for an automated way of deleting duplicate appointments from calendars (most often caused by migration issues or mistaken mailbox imports, but there are lots of reasons that you could end up with duplicates).  So, here is a script that checks for and deletes duplicates.  As usual, it uses EWS to connect…


Exchange Web Services and SharePoint 2013 without ApplicationImpersonation

I previously wrote an article showing how to set up Sharepoint 2010 to be able to access users’ mailboxes using EWS and integrated authentication (i.e. no service account was needed for the EWS calls).  Things have changed with Sharepoint 2013, so this article details the process with the latest versions of the products (at the…


PowerShell: Merge mailbox folders

Note: I have removed the script download from this page, as maintaining it in two places seems unnecessary.  The new home for this script and any updates is here: https://code.msdn.microsoft.com/office/PowerShell-Merge-mailbox-e769c529.   A couple of years ago I wrote a script to move items from one folder to another in a user’s mailbox.  This seems to…


EWS: Missing SOAP headers when using the EWS Managed API

We’ve recently had a few cases where some SOAP headers were missing from the request when performing specific operations and targeting specific Exchange versions. This resulted in incorrect data being returned. For example, if you Target Exchange2010 or higher and wish to reply to or forward an EmailMessage, the TimeZone information specified when creating the…

0

EWS: Performance issues when accessing multiple mailboxes?

We’ve had a few cases come through over the past few months regarding slow performance against Office Online from an EWS service application.  Several of them have come down to a very simple .Net setting that isn’t necessarily obvious.  In fact, I first hit the issue myself when creating a streaming notification sample application, and it…

2

PowerShell: Search mailbox for items of a particular message class (ItemClass)

The Search-Mailbox cmdlet can be used to perform various searches within a mailbox, and while it serves many needs, there are some searches that it can’t do.  I wrote a PowerShell script to demonstrate how to perform a search of a mailbox (or mailboxes) using EWS, in this case looking for items of a particular…

32

EWS: Streaming Notifications and Exchange 2013 (and Office 365 Wave 15)

Exchange 2013 introduced a new affinity model which means that streaming subscriptions to multiple mailboxes need to be handled in a different way to earlier versions.  If you are connecting to a single mailbox, you shouldn’t have a problem, but you most likely will encounter issues if you are connecting to many mailboxes.  Additionally, the…

4