0
votes

If i have Calendars.Read application permission for events in user calenders, how do i create a subscription to a user calendar using graph api.

below i tried to create event subscription for 'user@mydomain.com' mailbox by updating resource parameter to 'users/user@mydomain.com/events' and is this the right way to subscribe get notifications of shared,delegated calendars of user?

{
   "changeType": "created,updated",
   "resource": "users/user@mydomain.com/events",
   "notificationUrl": "https://webhook.azurewebsites.net/api/send/myNotifyClient",   
   "expirationDateTime":"2016-11-20T18:23:45.9356913Z",
   "clientState": "secretClientValue"
}
1

1 Answers

0
votes

(Clarification: I have never created a notification for a resource of this type).

You did not state what the error was.

In your resource field it might need to be: /users/{userId}/events

The {userId} should not be a UPN but the UUID of the user.

{
   "changeType": "created,updated",
   "resource": "users/{userId}/events",
   "notificationUrl": "https://webhook.azurewebsites.net/api/send/myNotifyClient",   
   "expirationDateTime":"2016-11-20T18:23:45.9356913Z",
   "clientState": "secretClientValue"
}