Creating a calendar event is giving error
Bug Report
Prerequisites
- [x ] Can you reproduce the problem?
- [ x] Are you running the latest version?
- [x ] Are you reporting to the correct repository?
- [ x] Did you perform a cursory search?
Steps to Reproduce
It's possible that this is an issue with the Microsoft Graph API itself, but when I am trying to post to a calendar with the code:
await client.api(/users/${userPrincipalName}/events)
.header('content-type', 'application/json')
.post({ event: event })
or client.api(/users/${userPrincipalName}/calendar/events)
I get the error The property 'event' does not exist on type 'Microsoft.OutlookServices.Event, which according to the documentation https://docs.microsoft.com/en-us/graph/api/user-post-events?view=graph-rest-1.0 and https://docs.microsoft.com/en-us/graph/api/calendar-post-events?view=graph-rest-1.0, is what I should be posting to that endpoint. Any help would be appreciated. Thank you
@andrueastman The sample may be wrong.
@changus The parameter given in the post function is incorrect and the call should be as follows.
await client.api(/users/${userPrincipalName}/events)
.header('content-type', 'application/json')
.post( event );
@MIchaelMainer I will sort out the snippet generation for this asap.
This issue has been resolved. Closing this issue, for now, feel free to open the issue if needed.