我需要使用 microsoft graph api,更详细地说是日历之一,来检索用户的一些事件(最多 1000 个条目)。我需要过滤掉用户拒绝的事件。该信息存储在assignee
资源中,或者方便地存储在“responseStatus”属性中。
我遇到的问题是,每当我尝试检索受让人资源时,查询需要 10 倍的时间来执行(从没有受让人的 1.2 秒到有受让人的 12-14 秒)。( https://graph.microsoft.com/v1.0/me/events?select=id,subject,start,end,sensitivity,assignee&top=1000
)
所以我试图获得 responseStatus 并且......你猜怎么着,性能总是最差的 10 倍(https://graph.microsoft.com/v1.0/me/events?select=id,subject,start,end,sensitivity,responseStatus&top=1000
)
然后我决定尝试直接过滤它们 ( https://graph.microsoft.com/v1.0/me/events?select=id,subject,start,end,sensitivity,responseStatus&top=1000&filter=responseStatus/response ne 'declined'
),但我收到一条错误消息,指出“属性 'responseStatus' 不支持过滤。”
而且我很难过滤受让人资源。
那么......有没有一种简单的方法来过滤被拒绝的事件而不会出现此类性能问题?
您可以使用扩展属性 pidlidresponsestatus https://docs.microsoft.com/en-us/office/client-developer/outlook/mapi/pidlidresponsestatus-canonical-property过滤掉这些,例如
https://graph.microsoft.com/v1.0/me/events?$select=subject,body,bodyPreview,organizer,attendees,start,end,location,responsestatus&$filter=singleValueExtendedProperties/any(ep:ep/id eq 'Integer {00062002-0000-0000-C000-000000000046} Id 0x8218' and cast(ep/value, Edm.Int32) ne 4)
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句