Contributor

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

@diegoSpace , This is an duplicate question. . We are already discussion this on other thread.

@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

@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.

@diegoSpace you need to user POST method instead of PUT. and the userId is your email address 。and the correct request is as below.

 
 

correct.jpg

 

the wrong demo is like :

error demo.jpg

 

 

@Trinetra-MSFT When you say `duplicate`. Be kind enough to mention the original link