cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Creating a new Plan with MS Graph - Write requests (excluding DELETE) must contain the Content-Type header declaration.

Hey,


I'm building a flow for creating a new Planner for a group with the Microsoft Graph API.

For the request I use the Microsoft Docs https://docs.microsoft.com/en-us/graph/api/planner-post-plans?view=graph-rest-1.0&tabs=http

 

Recieving a plan works fine, but I can't create a new one. I get the error Write requests (excluding DELETE) must contain the Content-Type header declaration.

 

The Content Type is in the request. Please see the Screenshots

https://www.directupload.net/file/d/5803/mzw8loaf_png.htm

https://www.directupload.net/file/d/5803/nvqiloje_png.htm

https://www.directupload.net/file/d/5803/fgak2av6_png.htm

 

Has anyone an idea whats wrong?

 

Thanks to all 🙂

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Dual Super User
Dual Super User

Re: Creating a new Plan with MS Graph - Write requests (excluding DELETE) must contain the Content-Type header declaration.

Hi @wit4r7 

 

You have to pass the authorization as header in the headers section and pass JSON in the body (for items that you are passing in the query parameter)

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Highlighted
New Member

Re: Creating a new Plan with MS Graph - Write requests (excluding DELETE) must contain the Content-Type header declaration.

I found my mistake.
I put the body into the Queries and not into the body field. Then everything worked fine for me.

 

Passing the authentifaction as raw workes fine as well, it is not nessesarry to put into the header.

 

Best regards

wit4r7

View solution in original post

2 REPLIES 2
Highlighted
Dual Super User
Dual Super User

Re: Creating a new Plan with MS Graph - Write requests (excluding DELETE) must contain the Content-Type header declaration.

Hi @wit4r7 

 

You have to pass the authorization as header in the headers section and pass JSON in the body (for items that you are passing in the query parameter)

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Highlighted
New Member

Re: Creating a new Plan with MS Graph - Write requests (excluding DELETE) must contain the Content-Type header declaration.

I found my mistake.
I put the body into the Queries and not into the body field. Then everything worked fine for me.

 

Passing the authentifaction as raw workes fine as well, it is not nessesarry to put into the header.

 

Best regards

wit4r7

View solution in original post

Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (8,623)