0
votes

Seem that this API https://docs.microsoft.com/en-us/graph/api/user-post-events?view=graph-rest-1.0&tabs=http Is possibile to use with Application Token..

But When I use this POST format :

  /users/{id | userPrincipalName}/calendars/{id}/events

I imagine that the first id= is of the user 365

And the second id= id of calendar of this user example: https://graph.microsoft.com/v1.0/users/7abea3d2-9c59-4910-90c8-24a626a2ed0f/calendar/AAMkADRiNWMwZDIwLTNkNWMtNDlhZi04ODAxLTQyZjI0NGZjZjZiYgBGAAAAAADdzAdsxNzoS5NsTnjM9VXMBwDeKuBOt9H8SaQ6MfKsS4oyAAAAAAEGAADeKuBOt9H8SaQ6MfKsS4oyAAAAADKcAAA=/events

The result is this:

{
  "error": {
    "code": "BadRequest",
    "message": "Resource not found for the segment 'AAMkADRiNWMwZDIwLTNkNWMtNDlhZi04ODAxLTQyZjI0NGZjZjZiYgBGAAAAAADdzAdsxNzoS5NsTnjM9VXMBwDeKuBOt9H8SaQ6MfKsS4oyAAAAAAEGAADeKuBOt9H8SaQ6MfKsS4oyAAAAADKcAAA='.",
    "innerError": {
      "request-id": "11055856-32b4-4485-bf28-23e380d9e4ed",
      "date": "2020-05-27T13:22:23"
    }
  }
}

Have you any suggestion?

1
there is a typo in the url - you say users/id/calendar - there is missing an 's'. and the request url means: get user with id and from that user get calender with the given calendar id and of that calendar get the events.Homungus
thanks you! very stupid problem!!!Daniele Grillo

1 Answers

1
votes

@Thank @Homungus comment... missing a s in calendar string and now work!