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
2022-06-16T11:58:52.973+00:00

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
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,800 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.