Content-type header not being sent from web activity in ADF v2

Juan José Campillo 21 Reputation points
2020-09-07T09:02:32.263+00:00

Hi everyone,

We use a web activity in ADF v2 to interact with the Azure Automation Account API (Job creation) based on this specification https://learn.microsoft.com/en-us/rest/api/automation/job/create

Since 09-04-2020 the PUT web call isn't working because the header "Content-Type : application/json" is not being sent. The pipeline that contain the activity hasn't changed in months, just stopped working suddenly with the error:

  • Operation on target Automation - AAS Processing failed: {"code":"UnsupportedMediaType","message":"{\"Message\":\"The request entity's media type 'text/plain' is not supported for this resource.\"}"}

But the input request for the pipeline, does include the header:

{
"url": "https://management.azure.com/subscriptions/xxxxx/resourceGroups/xxxxx/providers/Microsoft.Automation/automationAccounts/xxxxx/jobs/55a1bfa2-340c-4120-ba42-43df9e9f4e14?api-version=2017-05-15-preview",
"method": "PUT",
"headers": {
"Content-type": "application/json"
},
"body": "{\"properties\":{\"runbook\":{\"name\":\"aas-masterdata-management\"},\"parameters\":{\"Masterdata_Table\":\"RLS\"},\"runOn\":\"\"}}",
"authentication": {
"type": "MSI",
"resource": "https://management.azure.com"
}
}

I've tried so far:

  • Recreate the pipeline
  • Test in a different ADF instance
  • Delete and redeploy all the pipelines
  • Delete the header
  • Change the header to lowercase, uppercase, etc.
  • Add the header twice
  • Use a self-hosted integration runtime
  • Test in Debug mode

Any of these tests have been successful. Just for confirmation, I've run the same call from Postman and from the rest api debug tool included within the Api documentation, both worked perfectly, if I set the content header to text/plain in postman or in the web tool I get exactly the same error than in ADF v2. It seems that something has changed in the web call activity of ADF v2 that hardcodes the content header as "text/plain" somehow.

Is someone facing this same issue ? As I said, pipeline definition hasn't changed in months, just stopped working few days ago.

22959-adf-error.png

Thanks,
Juanjo.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,342 questions
0 comments No comments
{count} votes

Accepted answer
  1. HarithaMaddi-MSFT 10,126 Reputation points
    2020-09-09T06:25:52.227+00:00

    Hi @Juan José Campillo ,

    Thanks for the patience. I got update from Product team that using "Content-Type" instead of "Content-type" will resolve this issue. This can be referred in the documentation. Please let us know if this is helping to fix the issue. If issue persists, we will be glad to assist further.


1 additional answer

Sort by: Most helpful
  1. Evgeny Grishchenko 486 Reputation points
    2020-09-07T10:19:51.28+00:00

    Have you tried to add the header Accept?

    "Accept": "application/json"