Receiving Change Notifications From another user's Calendar

1k views Asked by At

ENVIORNMENT


  • Outlook Desktop (Office 365);
  • Exchange Server;
  • Azure Cloud


INITIAL CONDITIONS


USER_A is USER_B's assistant and manages USER_B's calendar (Outlook Shared Calendar). We would like to track the changes in USER_B's calendar. In Outlook/Exchange speak, USER_A is a delegate of USER_B.

GOAL


When certain Outlook Calendar Items are modified, we'd like to call a Function App which will update a database. The calendar could be a Shared Calendar, but not necessarily a shared Calendar.

USE CASE


USER_B is not logged in, but USER_A creates an appointment in USER_B's calendar.

Even though USER_B is not logged in, we'd like to capture the change made by USER_A and update our database. In other words, a change notification should fire for the shared calendar, even though the owner of that calendar is not logged in.

QUESTION Does the Function App need "App" level permissions to do this?

Would the code look something like:

POST https://graph.microsoft.com/v1.0/subscriptions
Content-type: application/json

{
   "changeType": "created",
   "notificationUrl": "https://webhook.azurewebsites.net/api/send/UpdateDataBase",
   "resource": "users/{a-user-id}/events",
   "expirationDateTime":"2020-10-20T19:23:45.9376913Z",
   "clientState": "bigSecret",
   "latestSupportedTlsVersion": "v3"
}
1

There are 1 answers

0
ezG On

In order to get change notification in shared calendars, "Application" level permissions are required.

I found this here How to subscribe calendar event if calendar is given delegated permission using ms-graph api