Forum Discussion
Ashish_Jaiswal
Dec 13, 2022Copper Contributor
Office 365 Messages using Graph last 7 days and Sort By
Hello Experts,
Could someone please guide me how to modify my query so I get data in a sort by descending and ascending order.
I am using the below query.
https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/messages?$filter=startDateTime+gt+2022-12-06T11:24:37.837Z
Okay, I have also tried below query this works!! but does not get me all the message, like there is a difference of 5-6 message when I manually check.
https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/messages?$orderby=lastModifiedDateTime+desc&$filter=startDateTime+gt+2022-12-06T00:00:00Z1 Reply
- Not sure I understand the question here. Are you saying you get different number of results once you add the orderby operator? You have two different values for the startDateTime filter, which might explain any differences.