我需要从 Graph API 事件中获取没有任何类别或没有特定类别的事件 所以,当我发送时:
https://graph.microsoft.com/v1.0/me/calendarView?startDateTime=2024-01-05T12:32:50.095Z&endDateTime=2024-01-31T12:32:50.095Z&$filter=not (categories/any(x:x eq 'MySyncJob'))
我收到回复了
{
"error": {
"code": "ErrorInternalServerError",
"message": "An internal server error occurred. The operation failed."
}
}
但是要求:
https://graph.microsoft.com/v1.0/me/calendarView?startDateTime=2024-01-05T12:32:50.095Z&endDateTime=2024-01-31T12:32:50.095Z&$filter=categories/any(x:x eq 'MySyncJob')
和
https://graph.microsoft.com/v1.0/me/calendarView?startDateTime=2024-01-05T12:32:50.095Z&endDateTime=2024-01-31T12:32:50.095Z&$filter=categories/any(x:x ne 'MySyncJob')
工作良好...
我做错了什么?
您可以尝试以下方法看看是否有效。
https://graph.microsoft.com/v1.0/me/calendarView?startDateTime=2024-01-05T12:32:50.095Z&endDateTime=2024-01-31T12:32:50.095Z&$filter=NOT(categories/any(x:x eq 'MySyncJob'))