Weird difference between Export API and Microsoft Graph API responses

Nikita Krivets 486 Reputation points
2022-11-30T19:55:01.88+00:00

Hi,

There is different behavior for Export API and Microsoft Graph API responses.

I have an edited message.

When I perform getAllMessages() request (https://graph.microsoft.com/v1.0/users/<user-id>/chats/getAllMessages) the response is

{  
                "@odata.type": "#microsoft.graph.chatMessage",  
                "id": "1668788874281",  
                "replyToId": null,  
                "etag": "1668789033861",  
                "messageType": "message",  
                "createdDateTime": "2022-11-18T16:27:54.282Z",  
                "lastModifiedDateTime": "2022-11-18T16:30:33.862Z",  
                "lastEditedDateTime": "2022-11-18T16:30:33.77Z",  
}  

LastModifiedDateTime and lastEditedDateTime values are not the same

"lastModifiedDateTime": "2022-11-18T16:30:33.862Z"  
"lastEditedDateTime": "2022-11-18T16:30:33.77Z"  

However when I check this message against Microsoft Graph API (https://graph.microsoft.com/v1.0/users/<user-id>/chats/<char-id>/messages), the response is

{  
    "id": "1668788874281",  
    "replyToId": null,  
    "etag": "1668789033861",  
    "messageType": "message",  
    "createdDateTime": "2022-11-18T16:27:54.282Z",  
    "lastModifiedDateTime": "2022-11-18T16:30:33.862Z",  
    "lastEditedDateTime": "2022-11-18T16:30:33.862Z",  
    "deletedDateTime": null,  
}  

And lastModifedDateTime and lastEditedDateTime values here are identical.

"lastModifiedDateTime": "2022-11-18T16:30:33.862Z"  
"lastEditedDateTime": "2022-11-18T16:30:33.862Z"  

Is this a bug or an expected behavior? If it is an expected behavior then what are the reasons behind it?

Thanks!

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
10,157 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,061 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,283 questions
{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.