cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kubalaml
Helper II
Helper II

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
Regular Visitor

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. 

t-tatoku
Microsoft
Microsoft

@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.

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.

@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
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (3,916)