cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
kubalaml
Level: Powered On

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
ka05th30ry
Level: Powered On

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. 

Microsoft t-tatoku
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.

ka05th30ry
Level: Powered On

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.

kubalaml
Level: Powered On

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
firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

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!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (10,062)