Forum Discussion
diegoSpace
Apr 15, 2020Brass Contributor
"The OData request is not supported" when creating an Event in Teams with Graph API
I am trying to create an event with Graph API from my Teams bot.
I get a token for my app with POST
https://login.microsoftonline.com/{tenant ID}/oauth2/v2.0/token
The token is valid since I can use it for other purposes such as get Teams users:
https://graph.microsoft.com/v1.0/groups/{groupID}/members
Then I use this token (Bearer header) in a PUT
https://graph.microsoft.com/v1.0/users/{userId}/calendar/events
with an Azure userID in {userId} and an example event body
But I get an error response: "The OData request is not supported."
Any idea?
Thanks a lot,
Diego
- Jennifer1988Copper Contributor
diegoSpace you need to user POST method instead of PUT. and the userId is your email address 。and the correct request is as below.
the wrong demo is like :
- Trinetra-MSFT
Microsoft
diegoSpace , This is an duplicate question. . We are already discussion this on other thread.
- nuwanskCopper Contributor
Trinetra-MSFT When you say `duplicate`. Be kind enough to mention the original link
- AspComCopper Contributor
Trinetra-MSFT I find it rather arrogant to point out a duplicate post without linking to the original. I find myself in a similar position as the OP and this is now a dead-end.
- diegoSpaceBrass Contributor
Trinetra-MSFT Sorry, I got a problem responding in that thread and I started a new thread, but then I forgot to remove this thread. I wanted to remove it now but I can not see how... Sorry again