Microsoft Graph API Mail/Delta Queries/Subscription: How to detected if Mail has been moved from another folder into an observed one

Tobias Rademacher 1 Reputation point

We currently migrating our .Net Application from EWS to Graph API using msgraph-sdk-dotnet

Primarily we are using message-delta Requests to observe mail folders in order to detect incoming mails. So far so good.

When using EWS we were able to detect moved mail events/actions and to distinguish these mails from new incoming (new sent) mails. So far, we didn't figure out who this can be achieved by using MS Graph API.

There are use cases where we must distinguish a newly sent email from a Mail which has been moved/dragged from another folder into the observed one manually by any user (via Outlook). This use case scenario includes the following flow: Let's say the inbox is the observed folder, a new incoming mail has been sent to the mailbox and the mail has been detected by our delta request observer. Then the user decides to move this mail into another custom but not observed folder using Outlook. Finally, the user decides to drag this mail back into the observed folder. Now we'd like to have a solid strategy at hand to detect this mail as moved (not as sent or updated, we need to distinguish these states). Hint: This flow demonstrates why we can't really rely on isRead.

Are there any properties from Mail Resource which can be used to identify if a mail has been moved specifically? Maybe something not mentioned in the public API documentation (ODATA, something which can be extracted by folderIds etc.?) or something which is supported by beta API version? Any ideas?

We also investigated the subscription resource but did not find a specific changeType which specifically reflected a moved mail.

How should we resolve these issues? Any ideas how to develop a solid detection strategy for moved mails using Graph API?

Thx for any hint, advice or help you can give

Microsoft Graph SDK
Microsoft Graph SDK
A Microsoft software developer kit designed to simplify building high-quality, efficient, and resilient applications that access Microsoft Graph.
734 questions
Microsoft Graph Mail API
Microsoft Graph Mail API
A Microsoft API that supports accessing data in users' primary mailboxes and in shared mailboxes.
683 questions
No comments
{count} votes