We have a shared Office365 mailbox and I’m trying to write some Python code using MSGraph to identify emails which have been responded to.
In Outlook, if you attempt to reply to a message that has already been replied to then a message will pop up at the top of the email stating : “You are not responding to the latest message in this conversation. Click here to open it.” This is what I am attempting to mimic in my code.
I am able to list folders and emails quite happily, but I cannot work out how to identify conversations.
I have found a Microsoft post “List Conversations” https://learn.microsoft.com/en-us/graph/api/group-list-conversations?view=graph-rest-1.0&tabs=python From which I have extracted this line
result = await graph_client.groups.by_group_id('group-id').conversations.get()
which returns
msgraph.generated.models.o_data_errors.o_data_error.ODataError: APIError Code: 404 message: None error: MainError(additional_data={}, code='ErrorInvalidGroup', details=None, inner_error=None, message="The requested group 'group-id' is invalid.", target=None)
Which makes sense, as I have no idea what to enter for the group-id so I’ve just left in the literal text ‘group-id' from the original.
I don’t understand how groups are associated with an email conversation. Is anyone able to enlighten me as to what group-id I should be entering here, how I can find that id, and how groups are associated with email conversations.