I'm building a .NET Core WEB API that serves as an automation layer over Outlook messages and calendars using the Microsoft Graph SDK. One of the requirements is to identify which messages have been replied to or have been forwarded.
It's not yet clear to me how I can determine whether an email message has been forwarded or replied to when using the results of Graph Explorer "My Mail" sample request.
This answer states that the ConversationId
property remains the same (which is indeed the case) and that the only indication is either "FW:" or "RE:" prefixed to the subject. Also in the Message documentation I can't seem to find a proper, reliable way of identifying those.
Can anyone tell me how this can be done?
If your looking at mail in the Inbox and you want to know if they have been acted on by a Mail client (eg Oultook or OWA) then you could use PidTagLastVerbExecuted https://docs.microsoft.com/en-us/office/client-developer/outlook/mapi/pidtaglastverbexecuted-canonical-property (this is how outlook determines it) eg
https://graph.microsoft.com/v1.0/me/messages?$expand=SingleValueExtendedProperties($filter=(Id%20eq%20'Integer%200x1081'))
If a Message had been replied to you would see a result like
"singleValueExtendedProperties": [
{
"id": "Integer 0x1081",
"value": "102"
}
]
This still isn't 100% reliable so if your doing this for Auditing the only way is using the Tracking Logs (MessageTrace in Office365)
Thank you Glen! It won't be used for auditing, just need to pass a true/false value from my API to give the frontend an indicator whether or not to show a forwarded / replied arrow icon. So this will do nicely :) The only thing that looks a bit strange here, is that 102 is used for replies and 104 for forwarded messages. While the docs link respectively states 105 and 106.
I think the documentation is wrong, last time I used this I used github.com/stephenegriffin/MAPIStubLibrary/blob/master/include/… to get the verb enums.