繁体   English   中英

如何在日历视图中展开日历事件中的 Microsoft Graph 扩展属性

[英]How to expand Microsoft Graph extended properties in calendar events in a calendar view

使用 Microsoft Graph SDK,我意识到当我从日历事件集合中获取事件时,扩展属性在响应中:

graphClient.Me.Calendar.Events
.Request()
.Expand("SingleValueExtendedProperties($filter=id eq 'String {00020329-0000-0000-C000-000000000046} Name MyExtendedProperty')")
.Select("SingleValueExtendedProperties")
.GetAsync()

但是当我从日历视图集合中获取它们时,扩展属性被省略:

graphClient.Me.Calendar.CalendarView
.Request(new[]
{
    new QueryOption("StartDateTime", DateTime.UtcNow.AddMonths(-3).ToString("yyyy-MM-dd")),
    new QueryOption("EndDateTime", DateTime.UtcNow.AddMonths(3).ToString("yyyy-MM-dd"))
})
.Expand("SingleValueExtendedProperties($filter=id eq 'String {00020329-0000-0000-C000-000000000046} Name MyExtendedProperty')")
.Select("SingleValueExtendedProperties")
.GetAsync()

有谁知道这是设计限制还是有办法在日历视图中扩展扩展属性?

我尝试使用 Graph API 来扩展日历视图中的扩展属性,它对我有用。

示例请求 - [获取] https://graph.microsoft.com/v1.0/me/calendar/calendarView?startDateTime=2015-11-26T19:00:00-08:00&endDateTime=2015-11-28T19:00: 00-08:0&$expand=singleValueExtendedProperties($filter=id%20eq%20'String%20{66f5a359-4659-4830-9070-00040ec6ac6e}%20Name%20Fun')

在此处输入图片说明

尝试看看您是否可以在此处利用 Rest API。 希望这可以帮助。 谢谢!

@Shweta 是对的,日历视图甚至可以从 SDK 扩展。

我的错误是假设me/calendarViewme/events应该返回相同的事件集。

结果me/calendarView实际上返回重复系列中的单个事件,而不是像me/events那样的系列主。

这让我误以为我的扩展属性没有包含在内,但实际上由于在日历视图中包含了个别事件,它被推到了后面的页面。

暂无
暂无

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

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