Knowledgebase

KB - Write requests (excluding DELETE) must contain the Content-Type header declaration.

· 1 min read · Knowledgebase

This is a knowledgebase item. I hope it helps you out someday.

The issue#

When using the HTTP action in Power Automate or Logic Apps in combination with Graph API, you get the following error:

Write requests (excluding DELETE) must contain the Content-Type header declaration.

Screenshot related to The issue

Despite having a header included, you still got prompted with this error message.

Cause#

In my case, this happened when the API required a body that I did not provide. I used it to create a Temporary Access Pass, and if you don’t add a body, the default settings will apply.

Solution#

Use the documentation to see what body is required. Otherwise, simply adding {} to the body will fix issue.

Stay safe!

Comments

Comments load when you scroll here.