This is part 2 of my blog post on migrating EWS Search to the Graph API, in this part I'm going to be looking at using KQL Searches and using the new Microsoft Search API (currently in Beta). The big advantage these type of searches have over using SearchFilters is that these type of searches use the content indexes which can improve the performance of searches when folder item counts get high. They also allow you to query the contents of Attachments which are indexed through ifilters on the server. KQL queries on the Mailbox and Mailbox Folders In EWS you have been able to use firstly AQS and now KQL in the FindItems operation from Exchange 2013 up. To migrate these searches to Microsoft Graph is pretty simple eg an EWS FindItem query to search for all messages with a pdf attachment FindItemsResults fiItems = service . FindItems ( QueryFolder , " Attachmentnames:.pdf " , iv ) ; in the Graph you would use something like https: //graph.microsoft.com/v1.0/me/...
Pushing the Envelope in Messaging and Office 365 Development