question

PrasanthKancharla avatar image
0 Votes"
PrasanthKancharla asked saldana-msft edited

Identify forward and reply emails using Graph API

Hi Team,

As part of our requirement when we are reading the emails from Office365 mailbox using C# via Graph API, we wanted to identify incase that mail is replied or forwarded. Also we would like to know date and time stamps for when that mail is forwarded or replied.

Could you please help how to achieve this requirement with some example.

Thanks and Regards,
Prasanth

microsoft-graph-sdkmicrosoft-graph-mail
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

GlenScales-6756 avatar image
0 Votes"
GlenScales-6756 answered SebastianMatberg-4816 commented

You can use the PidTagLastVerbExecuted https://docs.microsoft.com/en-us/office/client-developer/outlook/mapi/pidtaglastverbexecuted-canonical-property to get the last action taken on a Message eg Forward,Replay etc 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"
         }
        ]

And you can use pidtaglastverbexecutedtime https://docs.microsoft.com/en-us/office/client-developer/outlook/mapi/pidtaglastverbexecutiontime-canonical-property for the time of the action eg

https://graph.microsoft.com/v1.0/me/messages?$expand=SingleValueExtendedProperties($filter=(Id%20eq%20'SystemTime%200x1082'))

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you for the tip! I'm having the same problem.
However, if an email was first replied to and then forwarded, the LastVerbExecuted is "forwarded", not "answered".
So how can I find out with certainty if an email in the inbox has been answered at any time before?
Thanks for your help!

0 Votes 0 ·