Microsoft Teams
A Microsoft customizable chat-based workspace.
9,627 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am trying to get Team channel messages filter on certain dates, e.g. createdDateTime, by:
https://graph.microsoft.com/v1.0/teams/<team-id>/channels/<channel-id>/messages?$filter=createdDateTime ge '2023-05-29T07:49:22.246Z'.
But I got response:
{
"error": {
"code": "BadRequest",
"message": "Invalid filter clause: A binary operator with incompatible types was detected. Found operand types 'Edm.DateTimeOffset' and 'Edm.String' for operator kind 'GreaterThanOrEqual'.",
"innerError": {
"date": "2023-11-07T21:48:18",
"request-id": "4311fc38-52f0-4921-8917-8502e009a741",
"client-request-id": "4757f844-b325-de95-c1ec-4a627e717d85"
}
}
}
There are a few threads on SO, etc. mentioning using/Not using '' on the datetime value, or use ""datetime" to wrap the value. But nothing really works.