0

I'm using Graph API to update calendar events. I've encountered following error on attempt to update calendar event with specific ID: "The property 'attendees' does not exist on type 'Microsoft.OutlookServices.Event" I'm doing PATCH request using following address: https://graph.microsoft.com/v1.0//me/events/${id} with this payload in JSON :

  {
      attendees: [{emailAddress: {address: "test@test.com", name: "Jan Kowalski"}, type: "required"}]
      body: {content: ""}
      end: {dateTime: "2022-11-20T21:13:51", timeZone: "Europe/Warsaw"}
      location: {displayName: "Dom"}
      start: {dateTime: "2022-11-13T21:13:51", timeZone: "Europe/Warsaw"}
      subject: "My event" 
    }

According to the documentation such properties exist.

Get event and deleting event work.

What more when I am trying to do the same update query with the token copied from the Graph Explorer, updating works fine. I am using MSAL2 auth provider for authentication

The question is - am I doing something wrong? May it be something with permissions?

kavyaS
  • 8,026
  • 1
  • 7
  • 19
Ewelin
  • 1
  • 1
  • Note if the meeting location has been set up as a resource, or if the event involves some equipment that has been set up as a resource: Invite the resource as an attendee. Set the attendee type property as ` resource`. Also see [notes-for-updating-specific-properties](https://learn.microsoft.com/en-us/graph/api/event-update?view=graph-rest-1.0&tabs=http#notes-for-updating-specific-properties). – kavyaS Nov 22 '22 at 07:28
  • @kavyaSaraboju Well the problem is that each property gives this error , either location and start,end ,body property (attendees shows up in the error because its the first key in this object ). It looks like none of this property exists in type 'Microsoft.OutlookServices.Event", but how is it possible if the documentation says opposite. – Ewelin Nov 22 '22 at 11:50
  • Are you missing double quotes around attendees and other properties. Have you tried upgrading library ? Also check with user endpoint instead of me > `https://graph.microsoft.com/v1.0/users//events/..` – kavyaS Nov 22 '22 at 12:00

0 Answers0