cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Send an HTTP request to Azure DevOps errors on Content-Type

I have a Flow which worked for months then started failing recently even though I haven't made any changes to it. This Flow reads email and creates an ADO work item including embedding attachments which is where it is failing. 

 

Here is the call. 

Relative URI: PROJECT/_apis/wit/attachments?fileName=image001.png&api-version=5.1

ADOAddAttachment.png

Notice that Content-Type is populated. Here is the error. 

 

ADOError1.png

ADOError2.png

Notice that Content-Type is being passed in the header, but here is the error.

 

{
"$id": "1",
"innerException": null,
"message": "The request indicated a Content-Type of \"\" for method type \"POST\" which is not supported. Valid content types for this method are: application/json, application/json-patch+json, application/octet-stream.\r\nclientRequestId: eca14d01-857e-4785-9349-0977ba8eb4f5",
"typeName": "Microsoft.VisualStudio.Services.WebApi.VssRequestContentTypeNotSupportedException, Microsoft.VisualStudio.Services.WebApi",
"typeKey": "VssRequestContentTypeNotSupportedException",
"errorCode": 0,
"eventId": 3000
}

I've tried different ways to get the Content-Type to work including using a variable or switching to text mode, but nothing works

 

4 REPLIES 4
Highlighted
Regular Visitor

Re: Send an HTTP request to Azure DevOps errors on Content-Type

I am also experiencing this issue when trying to add attachments to DevOps work items:

 

Screen Shot 2020-02-19 at 2.56.20 PM.pngScreen Shot 2020-02-19 at 2.58.11 PM(1).png

 

I am receiving the following response:

{
  "$id": "1",
  "innerException": null,
  "message": "The request indicated a Content-Type of \"\" for method type \"POST\" which is not supported. Valid content types for this method are: application/json, application/json-patch+json, application/octet-stream.\r\nclientRequestId: 5749d22d-ac6a-49a1-8334-c10c37db6daf",
  "typeName": "Microsoft.VisualStudio.Services.WebApi.VssRequestContentTypeNotSupportedException, Microsoft.VisualStudio.Services.WebApi",
  "typeKey": "VssRequestContentTypeNotSupportedException",
  "errorCode": 0,
  "eventId": 3000
}

 I have tried various different conversions to no avail. 

Highlighted
Microsoft
Microsoft

Re: Send an HTTP request to Azure DevOps errors on Content-Type

@kubalaml 

It seems several users experiencing similar problems.

I have checked if there is any similar case reported, but could not find.

Please open a service request.

Highlighted
Regular Visitor

Re: Send an HTTP request to Azure DevOps errors on Content-Type

I was finally able to find a solution using an Azure Function thanks to @hammer via his post in this thread

See my post in this thread for details.

Highlighted
Frequent Visitor

Re: Send an HTTP request to Azure DevOps errors on Content-Type

@ka05th30ry thanks for the heads up. I've been meaning to get into Logic Apps / Functions so this may be the inspiration I needed. 

 

I submitted a support request through the Power Automate admin portal so hopefully if this is a bug, they can resolve it quickly. 

Helpful resources

Announcements
Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Top Solution Authors
Users online (5,902)