0

An appointment that has participants, always return an empty collection when queried for using the appointment.Invitees property.

Here is what I am trying to do,

var calendarStore = await AppointmentManager.RequestStoreAsync(AppointmentStoreAccessType.AllCalendarsReadOnly);
var appointments = await calendarStore.FindAppointmentsAsync(DateTimeOffset.Now, TimeSpan.FromDays(30), new FindAppointmentsOptions() { IncludeHidden = true });
foreach (var appointment in appointments)
{
    // appointment.Invitees is always null, even for appointments that has some! 
    foreach (var invitee in appointment.Invitees)
    {
        // do something here...
    }
}

I tried to add Contacts capability in addition to Appointment, but in vain. Any thoughts on why such a bizarre behavior?

sudarsanyes
  • 3,156
  • 8
  • 42
  • 52

1 Answers1

0

The appointmentsSystem capability is necessary when access the Invitees property.

 <Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
         xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
         xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
         xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
     IgnorableNamespaces="uap mp rescap">

<Capabilities>
    <Capability Name="internetClient"/>
    <uap:Capability Name="appointments" />
    <uap:Capability Name="contacts" />
    <rescap:Capability Name="appointmentsSystem" />   
 </Capabilities>

No one may request access to this capability for store submission

Please note that the appointmentsSystem is useless in store app.

Nico Zhu
  • 32,367
  • 2
  • 15
  • 36
  • I tried to add this restricted capability to the manifest file manually, but I see do difference. This is what I have now. – sudarsanyes Oct 16 '17 at 14:28