Search code examples
emailmicrosoft-graph-api

Keep track of conversation ID when users change the subject - Microsoft Graph API


If users send a reply and they change the subject field, the conversationID changes. Is there a way I can tell if the reply belongs to an existing conversation?

I've looked into storing the conversationID in the first email of the chain using internet message headers and singleValueExtendedProperties, but my custom values don't seem to stick on replies.


Solution

  • The in-reply-to and references headers should contain enough information to work out if its part of the thread but it is not required by RFC 2822 standards (most clients do use them so unless you have any outlier clients it should work). Its worth reading through the Rfc description of these fields https://www.rfc-editor.org/rfc/rfc2822 as it outlines threading behaviour. singleValueExtendedProperties or custom properties/extensions will be dropped when the message goes out of your Org and aren't included in responses the same with adding you own x-headers and aren't generally any use in tracking conversations.