通过使用正确的单值扩展属性参数,我可以从用户日历中获取带有$expand的事件。
https://graph.microsoft.com/v1.0/me/calendar/calendarview?startDateTime=2018-10-09&endDateTime=2019-01-09&$expand=singleValueExtendedProperties($filter=id eq 'String {cfe1492e-2c52-462d-8f0d-c1139326d46f} Name PropertyName')
这将输出前10个事件,其中一些事件填充了该属性(YEAY!!)。
但是如何结合使用$select参数呢?
因为上面的查询将返回这些事件的所有属性,而我只对所有事件的id、subject和singleValueProperties属性感兴趣。根据此页,我应该只能用$select参数选择我的应用程序想要的属性,但是我不知道如何将它与singleValueProperty (或任何其他扩展属性)一起使用。
我尝试了以下列表(与$expand一起实际获得包含的属性):
$select=id,subject,singleValueProperties (single value properties not included)
$select=id,subject,singleValueProperties.value (not included)
$select=id,subject,singleValueProperties/value (bad request)
$select=id,subject,singleValueProperties.* (not included)
$select=id,subject (not included)发布于 2018-10-10 16:47:29
$expand:nextLink$filter**, $select**)**的
这里的措辞有点奇怪,因为$expand和$select肯定在其他地方一起工作。尽管如此,我已经能够复制相同的行为,显然,在这种情况下,$expand和$select不能。
这在使用查询参数中也有记录。
注意:不是所有的关系和资源都支持
$expand查询参数。例如,可以在directReports、manager和memberOf关系上展开user,但不能扩展user的events、messages或photo关系。并非所有资源或关系都支持在展开项上使用$select。。
https://stackoverflow.com/questions/52723890
复制相似问题