I tried using Graph API's to expand extended properties in the calendar view and it worked for me.
Try and see if you could leverage Rest API's here.
Hope this helps. Thanks!
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Using Microsoft Graph SDK, I realised that when I get events from a calendar events collection, the extended properties are in the response:
graphClient.Me.Calendar.Events
.Request()
.Expand("SingleValueExtendedProperties($filter=id eq 'String {00020329-0000-0000-C000-000000000046} Name MyExtendedProperty')")
.Select("SingleValueExtendedProperties")
.GetAsync()
But when I get them from a calendar view collection, the extended properties are omitted:
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()
Does anyone know if this is a by-design restriction or if there's a way to expand the extended properties in the calendar view?
I tried using Graph API's to expand extended properties in the calendar view and it worked for me.
Try and see if you could leverage Rest API's here.
Hope this helps. Thanks!
@Shweta Choudhary was right, calendar view works with the expand even from the SDK.
My mistake was assuming me/calendarView
and me/events
were supposed to return the same set of events.
Turns out me/calendarView
actually returns individual occurrences in a recurring series instead of the series master like in me/events
.
This was causing me to mistaken that my extended properties were not included, but in fact it was been pushed out to later pages due to the inclusion of individual occurrences in calendar view.