I have subscribed a room calendar using graph api and subscribing all the events like Create , Update and Delete.
In my scenario when user invited above room abc@onmicrosoft.com and then cancel original meeting then cancel event get fired in room calendar. two things happen
Instead of getting delete notification , I get update notification. Now, assuming this behavior is due to event has moved to different folder which i am assuming is deleteditems in this case, so its being notified as an update. Can some one confirm if its correct behavior or a bug?
when above event happens the id in the notification response i am getting is same id before the event was cancelled, trying to search the event using above id using graph api for above room abc@onmicrosoft.com.
var Evt = await graphServiceClient.Users[resourceId].Events[itemid] .Request() .GetAsync();
but here i am getting ErrorItemNotFound error. i am assuming this is due to this event has now moved and its id has now been changed. so seems like id sent by notification is not useful here as did not find any api which can search for deleted events.
My main purpose is to somehow fetch the icaluid of above event, but as we are unable to search it using the id given by above notification.
i tried various methods suggested on other post like searching in delteditems folder, but this also does not provide the icaluid information information i am looking for .
var myevents = await graphServiceClient.Users[resourceId].MailFolders.DeletedItems.Messages
.Request()
.GetAsync();
events = myevents;
and tried to expand it as well to give the vent specific data
var myevents = await graphServiceClient.Users[resourceId].MailFolders.DeletedItems.Messages
.Request()
.Expand("eventMessage/event")
.GetAsync();
but this gives an error saying
System.AggregateException: One or more errors occurred. (Code: BadRequest
Message: Parsing OData Select and Expand failed: Could not find a property named 'eventMessage' on type 'microsoft.graph.message'
Does anyone know if its possible to get a the particular deleted events data, i searched through various post and it seems like this is still not supported operation.
Let me know if there is any reliable trick can be used to get the data.