How can I be notified in code via MS Graph, if a calendar event is declined

Julian Tucker 16 Reputation points
2024-02-22T17:05:40.11+00:00

How can I be notified in code if a calendar event is declined?

Hi,

I've been trying to work out how to pick up calendar decline events in Outlook, using MS Graph.

What I have so far:

  1. An API (Graph API Hook) that I can monitor in Azure
  2. C# code to register myself for events and messages, pointing to the API in 1. above
  3. Send myself an Outlook Calendar appointment
  4. See that appointment arrive in my Graph API hook output window in Azure (1. above)
  5. Use Graph Explorer to view data based on 'me' and an event id and / or a message id.
  6. This data that comes back is only 'messages' when I decline from my Inbox I can't seem to marry anything up in the data that I obtain in step 5. to indicate that it is a declined event. For instance I need the uid and/or the iCalUId_v2 of the event to indicate that I have a specific type of event. How can I get that original event data from the messages received in 5. above? Really hoping someone can help, as I've spent quite a while on setting this test up so far, to no avail!!
Microsoft Security Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Julian Tucker 16 Reputation points
    2024-02-22T17:12:51.9933333+00:00

    OK, I'm editing my response here. I can see that I did not add 'deleted' to the list of events to subscribe to. I am now getting deleted and updated events on a decline.

    So my next question is this is anyone is out there: How do I then get hold of the EXACT event that has been declined. I can see user and event ids in the response data, but on trying to obtain this info based on the id, I don't get the event that has been declined, just a whole bunch of events going backwards in time form now.

    I'm kind of assuming that as it has been declined, it no longer exists. In which case, what's the point of an ID and is this possible, in any way? I'm hoping someone can advise.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.