How to set Auth Headers on http linked service in Data factory via api

Per Hederos 96 Reputation points
2021-09-30T11:58:28.037+00:00

Hi!

I generate the data factory via .net api (ie: Microsoft.Azure.Management.DataFactory) but I coming up short on this one thing. That is how to set the Auth Header of a Http Linked service. It is easy using the studio but is very hard to do via the .net API.

In the studio you can just enter the value as illustrated below generating a json-structure.

136702-image.png

136616-image.png

But in the code there is no such property. I assume you have to try setting AdditionalProperties. But that property wants a Dictionary<string, object> I no matter what I try I can't get it to work. I have tried googling this in many ways but I have found no clue on how to succeed.

Can anyone please help me? How do I set AuthHeaders in the HttpLinkedService-object?

136657-image.png

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

Accepted answer
  1. Per Hederos 96 Reputation points
    2021-09-30T12:18:03.67+00:00

    Never mind! Stupid me. After upgrading to latest version of the nuget-package the property AuthHeaders appeared.

    Passing a JObject seems to work. Might be other objects that work as well...

    136712-image.png

    0 comments No comments

0 additional answers

Sort by: Most helpful