Response of GET /mesages API doesn't include milliseconds in DateTimes. I $filter by milliseconds, but I don't get them in response. Can I include ms in response?
Hi,
When I execute GET request (Note: sentDateTime is with 000 ms)
https://graph.microsoft.com/v1.0/me/messages?$orderby=sentDateTime&$top=100&$filter=sentDateTime gt 2021-10-20T15:38:42.000Z and isDraft eq false
I get the response:
...
"receivedDateTime": "2021-10-20T15:38:42Z",
"sentDateTime": "2021-10-20T15:38:42Z",
...
Even though I have milliseconds in the request sentDateTime, I don't get them in response.
I would assume that you take millisecond precision in account when resolving gt/ge/lt/le, but can I somehow (through some Request Header) specify that milliseconds are returned in the response.
When I change request a bit (Note: sentDateTime is with 200 ms)
https://graph.microsoft.com/v1.0/me/messages?$orderby=sentDateTime&$top=100&$filter=sentDateTime gt 2021-10-20T15:38:42.200Z and isDraft eq false
I don't get that one message in response
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('SlobaTest%40outlook.com')/messages",
"value": []
}
So, basically, is there a way to get milliseconds in the response?
So I can actually update the message I store to have those milliseconds (not set 000 default) and then reuse it in the $filter to get messages that are greater then the sentDateTime of that message I have.
Similar question: https://stackoverflow.com/questions/59354787/microsoft-graph-get-messages-with-gt-filter-acts-as-ge