Export API getAllMessages lastModifiedDateTime is not updated

Nikita Krivets 486 Reputation points
2022-07-25T16:38:33.037+00:00

Hello,

When I use Export API ( https://learn.microsoft.com/en-us/microsoftteams/export-teams-content ), say "users/335f3c99-ff13-42b4-99c7-2664e1a03deb/chats/getAllMessages" endpoint, it provides me the the following response:

{  
    "@odata.type": "#microsoft.graph.chatMessage",  
    "id": "1655935493202",  
    "replyToId": null,  
    "etag": "1655935493202",  
    "messageType": "message",  
    "createdDateTime": "2022-06-22T22:04:53.203Z",  
    "lastModifiedDateTime": "2022-06-22T22:04:53.203Z",  
    "lastEditedDateTime": null,  
    "reactions": [  
        {  
            "reactionType": "laugh",  
            "createdDateTime": "2022-07-22T18:50:45Z",  
            "user": {  
                "application": null,  
                "device": null,  
                "user": {  
                    "id": "f16736b6-02f1-4240-b5b4-fd6e16d3cbaf",  
                    "displayName": null,  
                    "userIdentityType": "aadUser"  
                }  
            }  
        }  
    ]  
}  

lastModifiedDateTime is not changing to the time of reaction.

message -> "lastModifiedDateTime": "2022-06-22T22:04:53.203Z"  
reaction -> "createdDateTime": "2022-07-22T18:50:45Z",  

But if you use a different endpoint e.g. "users/user@tenant .onmicrosoft.com/chats/19:9677d27140684c9aa74012ff4883c604@thread.v2/messages", you will get a different response:

{  
    "id": "1655935493202",  
    "replyToId": null,  
    "etag": "1658515845455",  
    "messageType": "message",  
    "createdDateTime": "2022-06-22T22:04:53.203Z",  
    "lastModifiedDateTime": "2022-07-22T18:50:45.456Z",  
    "lastEditedDateTime": null,  
    "deletedDateTime": null,  
    "reactions": [  
        {  
            "reactionType": "laugh",  
            "createdDateTime": "2022-07-22T18:50:45.47Z",  
            "user": {  
                "application": null,  
                "device": null,  
                "user": {  
                    "id": "f16736b6-02f1-4240-b5b4-fd6e16d3cbaf",  
                    "displayName": null,  
                    "userIdentityType": "aadUser"  
                }  
            }  
        }  
    ]  
}  

and lastModifeddateTime is actually updated here.

message -> "lastModifiedDateTime": "2022-07-22T18:50:45.456Z",  
reaction -> "createdDateTime": "2022-07-22T18:50:45.47Z",  

Is Export API supposed to handle such situations and update lastModifiedDateTime?

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.
2,983 questions
{count} vote