I’m trying to use the Graph API to get messages from a Teams chat, but by filtering to a specific date-time range. For some inexplicable reason, the filter based on the message’s createdDateTime property does NOT allow specifying a start/lower boundary. It only allows upper boundary (end of range). If you look at the documentation for it, the query parameters allowed for filtering are lastModifiedDateTime and createdDateTime. However, only lastModifiedDateTime allows specifying greater than (gt) and less than (lt). For createdDateTime, only less than (lt) is allowed. There is no explanation for why this is.
So what I’m asking is, how can I therefore get messages that were sent within a specific date range? The lastModifiedDateTime gets affected if the user edits their message, if other users react to the message with emojis, etc. That opens too many possibilities of getting inaccurate results (ie, messages can either be missed or incorrectly included).