"The OData request is not supported" when creating an Event in Teams with Graph API

%3CLINGO-SUB%20id%3D%22lingo-sub-1308283%22%20slang%3D%22en-US%22%3E%22The%20OData%20request%20is%20not%20supported%22%20when%20creating%20an%20Event%20in%20Teams%20with%20Graph%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1308283%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%20create%20an%20event%20with%20Graph%20API%20from%20my%20Teams%20bot.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20get%20a%20token%20for%20my%20app%20with%20POST%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Flogin.microsoftonline.com%2F%257Btenant%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Flogin.microsoftonline.com%2F%7Btenant%3C%2FA%3E%3CSPAN%3E%26nbsp%3BID%7D%2Foauth2%2Fv2.0%2Ftoken%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EThe%20token%20is%20valid%20since%20I%20can%20use%20it%20for%20other%20purposes%20such%20as%20get%20Teams%20users%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fgroups%2F%257BgroupID%257D%2Fmembers%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fgroups%2F%7BgroupID%7D%2Fmembers%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EThen%20I%20use%20this%20token%20(Bearer%20header)%20in%20a%20PUT%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fusers%2F%257BuserId%257D%2Fcalendar%2Fevents%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fusers%2F%7BuserId%7D%2Fcalendar%2Fevents%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Ewith%20an%20Azure%20userID%20in%20%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fusers%2F%257BuserId%257D%2Fcalendar%2Fevents%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%7BuserId%7D%3C%2FA%3E%26nbsp%3Band%20an%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3Bexample%20event%20body%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EBut%20I%20get%20an%20error%20response%3A%26nbsp%3B%22The%20OData%20request%20is%20not%20supported.%22%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20idea%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20a%20lot%2C%3C%2FP%3E%3CP%3EDiego%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1308283%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1311834%22%20slang%3D%22en-US%22%3ERe%3A%20%22The%20OData%20request%20is%20not%20supported%22%20when%20creating%20an%20Event%20in%20Teams%20with%20Graph%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1311834%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F402611%22%20target%3D%22_blank%22%3E%40diegoSpace%3C%2FA%3E%26nbsp%3B%2C%20This%20is%20an%20duplicate%20question.%20.%20We%20are%20already%20discussion%20this%20on%20other%20thread.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1312335%22%20slang%3D%22en-US%22%3ERe%3A%20%22The%20OData%20request%20is%20not%20supported%22%20when%20creating%20an%20Event%20in%20Teams%20with%20Graph%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1312335%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F371090%22%20target%3D%22_blank%22%3E%40Trinetra-MSFT%3C%2FA%3E%26nbsp%3BSorry%2C%20I%20got%20a%20problem%20responding%20in%20that%20thread%20and%20I%20started%20a%20new%20thread%2C%20but%20then%20I%20forgot%20to%20remove%20this%20thread.%20I%20wanted%20to%20remove%20it%20now%20but%20I%20can%20not%20see%20how...%20Sorry%20again%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1554421%22%20slang%3D%22en-US%22%3ERe%3A%20%22The%20OData%20request%20is%20not%20supported%22%20when%20creating%20an%20Event%20in%20Teams%20with%20Graph%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1554421%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F371090%22%20target%3D%22_blank%22%3E%40Trinetra-MSFT%3C%2FA%3E%26nbsp%3BI%20find%20it%20rather%20arrogant%20to%20point%20out%20a%20duplicate%20post%20without%20linking%20to%20the%20original.%20I%20find%20myself%20in%20a%20similar%20position%20as%20the%20OP%20and%20this%20is%20now%20a%20dead-end.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1778361%22%20slang%3D%22en-US%22%3ERe%3A%20%22The%20OData%20request%20is%20not%20supported%22%20when%20creating%20an%20Event%20in%20Teams%20with%20Graph%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1778361%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F402611%22%20target%3D%22_blank%22%3E%40diegoSpace%3C%2FA%3E%26nbsp%3Byou%20need%20to%20user%20POST%20method%20%3CSPAN%3Einstead%20of%20PUT.%20and%20the%20userId%20is%20your%20email%20address%20%E3%80%82and%20the%20correct%20request%20is%20as%20below.%3C%2FSPAN%3E%3CSPAN%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CDIV%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22correct.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F226608iBCD9A0CA087A11DE%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22correct.jpg%22%20alt%3D%22correct.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3Ethe%20wrong%20demo%20is%20like%20%EF%BC%9A%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22error%20demo.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F226607i7CE8025883E9382E%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22error%20demo.jpg%22%20alt%3D%22error%20demo.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2518435%22%20slang%3D%22en-US%22%3ERe%3A%20%22The%20OData%20request%20is%20not%20supported%22%20when%20creating%20an%20Event%20in%20Teams%20with%20Graph%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2518435%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F371090%22%20target%3D%22_blank%22%3E%40Trinetra-MSFT%3C%2FA%3E%26nbsp%3BWhen%20you%20say%20%60duplicate%60.%20Be%20kind%20enough%20to%20mention%20the%20original%20link%3C%2FP%3E%3C%2FLINGO-BODY%3E
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

5 Replies

@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

We support Ukraine and condemn war. Push Russian government to act against war. Be brave, vocal and show your support to Ukraine. Follow the latest news HERE