简体   繁体   English

使用 MS Microsoft Graph 按类别获取和过滤 Outlook 事件

[英]Get and Filter Outlook events by Category using MS Microsoft Graph

am trying to filter Outlook events by category but am having trouble with the queries.我正在尝试按类别过滤 Outlook 事件,但在查询时遇到问题。 I tried using the following queries but they return error messages.我尝试使用以下查询,但它们返回错误消息。

https://graph.microsoft.com/v1.0/me/events?$filter=startswith(Categories, 'test')

https://graph.microsoft.com/v1.0/me/events?$filter=contains(Categories, 'test')

I get the following output我得到以下输出

"code": "BadRequest",
"message": "The argument for an invocation of a function with name 'contains' is not a single value. All arguments for this function must be single values.",

What's the proper syntax for this query?此查询的正确语法是什么? Does the graph even support filtering by Category for events?该图甚至支持按类别过滤事件吗? If so, is there any other way in which I can filter events by category?如果是这样,还有其他方法可以按类别过滤事件吗?

thanks谢谢

请使用以下语法: https : //graph.microsoft.com/v1.0/me/events ?$filter=categories/any(a:a+eq+'Red+Category')

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM