What changes when EWS Managed API code moves to Microsoft Graph
If you are porting EWS Managed API code to Microsoft Graph, you will find a Graph call for most EWS operations. Many of those calls behave differently from what your EWS code expects. How we test Each of our 186 test scenarios is a real piece of EWS Managed API code. We run every scenario on Exchange Online twice, once through EWS and once through Microsoft Graph v1.0, and compare the two answers…
When migrating EWS Managed API code to Microsoft Graph, many functions behave differently. Most Microsoft Graph calls mirror their EWS counterparts, but subtle differences exist. To test compatibility, run each of the 186 test scenarios in both EWS and Graph, comparing results field by field. The EWS operations your application uses can be found using the EWS usage report in the Microsoft 365 admin center, or the tool ews-scan.
Sending mail in Graph differs from EWS. The copy of a sent message is always saved in Sent Items, rather than allowing the caller to choose the destination folder. Graph's sendMail method can skip copy saving by setting saveToSentItems to false, but it cannot specify a folder. Graph returns no ID upon sending, and sent message retrieval requires creating a draft with Prefer: IdType=ImmutableId, sending it, and reading the response by the same ID later.
Read receipts are automatically sent with Graph, while EWS uses SuppressReadReceipts to suppress them.
Meeting attendees are always notified in Graph, unlike EWS where organizers can send, delete, or cancel meetings without notifying attendees. Graph always sends invitations, updates, or cancellations when creating, changing, or deleting meetings with attendees. Graph responses offer fewer fields than EWS; fields like Cc, Bcc, sensitivity, receipt requests, and the saved copy folder cannot be passed.
The change key returned by Graph after creating a meeting may not match on subsequent reads, requiring a read first to confirm.
When filtering and sorting items, Graph ties filter and sort order together. A request with both $filter and $orderby must follow specific rules, failing with InefficientFilter if not adhered to. A search query can only return up to 1,000 results sorted by the sent date. Searches on contacts, events, and tasks do not support filtering or sorting. Contact, event, and task search capabilities are limited to Microsoft Graph, with no server-side text search.
Graph's filtering and sorting capabilities differ from EWS. Extended properties have specific limitations in Graph. Moving items in Graph entails creating a new item with a new ID and creation time, unlike EWS which supports moving items. Tasks live in Microsoft To Do, with no extended properties or progress representation in Graph.
Contact groups, personal distribution lists, and posts are not supported in Graph v1.0. Binary extended properties cannot be used in filters, and results from the $search operation lack change keys and ignore $expand. Graph's attachment handling differs, as it accepts requests with attachments and drops the inner attachments. Lastly, stored sync states do not transfer between EWS and Graph, requiring a full synchronization after switching.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.