Failure happened on 'Sink' side. ErrorCode=UserErrorKeyConflict,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Key Content-Type conflicts in AuthHeaders/AdditionalHeaders,Source=Microsoft.DataTransfer.ClientLibrary,'

Chourasia, Sanoj K 0 Reputation points
2025-03-08T18:31:17.22+00:00

I am trying to post file using rest connector, but it is not allowing to add additional headers for Content-Type - as it is by default applying content-type as application/json, what if, i need to use different content-type. I believe it should be allowed to use custom Content-Type and not limited to application/json. This is a Gap. I know it can also be achieved using web activity and azure function but i want to use copy activity rest connector to post the data as it can handle more than 5 MB.

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

1 answer

Sort by: Most helpful
  1. Q&A Assist
    2025-03-08T18:31:17.2466667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The error you are encountering indicates a conflict with the Content-Type header when using the REST connector in Azure Data Factory. The REST connector automatically sets the Content-Type header to application/json and ignores any Accept header specified in additionalHeaders. Unfortunately, this means that you cannot customize the Content-Type header for requests made through the REST connector.

    If you need to use a different Content-Type, you might consider alternative methods such as using a web activity or an Azure function, as you mentioned. However, these alternatives may not support the same data size limitations as the copy activity.


    References:


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.