Forum Discussion
Create a Teams calendar event from a bot
diegoSpace - {id} should be user azure id or UPN. Could you please try using the azure id or UPN.
Nikitha-MSFT Thanks, Using the Azure id i get this error response:
"code": "ErrorInvalidRequest",
"message": "The OData request is not supported.",
- Nikitha-MSFTApr 14, 2020Former Employee
diegoSpace - Could you please share your request body what you are trying?
- diegoSpaceApr 14, 2020Brass Contributor
Nikitha-MSFT I used the example body from
https://docs.microsoft.com/en-us/graph/api/user-post-events?view=graph-rest-1.0&tabs=http
(updated date & timezone)
{
"subject": "Let's go for lunch",
"body": {
"contentType": "HTML",
"content": "Does late morning work for you?"
},
"start": {
"dateTime": "2020-04-15T12:00:00",
"timeZone": "Europe/Madrid"
},
"end": {
"dateTime": "2020-04-15T14:00:00",
"timeZone": "Europe/Madrid"
},
"location":{
"displayName":"Harry's Bar"
},
"attendees": [
{
"emailAddress": {
"address":"samanthab@contoso.onmicrosoft.com",
"name": "Samantha Booth"
},
"type": "required"
}
]
}- Trinetra-MSFTApr 15, 2020Former Employee
diegoSpace , Do you have required Calendar.ReadWrite permission in your access token? You can check that on jwt.io.