web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Question about the Gra...
Power Automate
Unanswered

Question about the Graph API and filtering messages from a Teams channel from the last 7 days - is it possible?

(0) ShareShare
ReportReport
Posted on by

Hello Everyone.

 

Using the Microsoft Graph API you can get the number of messages from a chat channel, like this:

 

GET  - https://graph.microsoft.com/v1.0/teams/{group-id-for-teams}/channels/{channel-id}/messages/{message-id}

 

Can this query be expanded to then filter through all those messages and display only those which were created/modified in the last 7 days?

 

Thanks so much for any advice.

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,846 Most Valuable Professional on at

    Hi @ianwuk,

     

    I would suggest to have a look at the Get channel messages delta method.

     

    That method also supports filtering on lastModifiedDateTime.

    https://graph.microsoft.com/v1.0/teams/<groupid>/channels/<channelid>/messages/delta?$filter=lastModifiedDateTime gt 2023-05-04T07:13:28.000z

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 953

#2
Valantis Profile Picture

Valantis 810

#3
Haque Profile Picture

Haque 622

Last 30 days Overall leaderboard