question

KacperFlorianskiTelepatNorth-3031 avatar image
0 Votes"
KacperFlorianskiTelepatNorth-3031 asked saldana-msft edited

Microsoft Teams API: Filtering channel messages by date

Hi,

I know some of the existing Microsoft API-s support the $filter query, which allows me to, for example, filter data based on the create/send/receive (etc.) timestamps.

I am in need of doing something similar for Microsoft Teams. More specifically, I'd like to filter by createdDateTime. For example, I could query: ...channels/<id>/messages/<id>?$filter=(createdDateTime ge 2015-02-12T18:58:01.624Z and createdDateTime le 2020-07-31T18:58:01.624Z).

I'd like to know if this query parameter will be introduced at all, and when if so.

microsoft-graph-teamworkmicrosoft-graph-sdk
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

By the way, it seems that I can't select the correct tags...

0 Votes 0 ·

1 Answer

RamjotSingh avatar image
0 Votes"
RamjotSingh answered KacperFlorianskiTelepatNorth-3031 commented

You can use https://docs.microsoft.com/en-us/graph/api/chatmessage-delta?view=graph-rest-beta&tabs=http and have a filter on lastModifiedTime to get similar behavior and then stop once you have reached the time where you want to stop. The order in this API is oldest to newest instead of newest to oldest.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you for letting me know about this API call,

However, I'd love to learn if there is any ETA for introducing the $filter query for the standard call instead.

0 Votes 0 ·