'Get a deleted ChatMessage from a channel or chat

I'm currently using change notifications to get notified of new channel/chat messages sent in my Tenant and then querying for the resource (and related properties) upon receiving said notifications.

This is working well in all cases except for when a message is deleted. I expected that querying for a deleted ChatMessage would give me back the resource with its deletedDateTime property set to a non-null value, but instead I just get a 404 as the resource was not found.

I am retrieving ChatMessages via a GET request to: https://graph.microsoft.com/v1.0/{resource-id} where resource-id is the id value specified in the change notification.

Is there a way to get deleted chat and channel messages from a Tenant via a GET request?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source