question

PerHederos-6610 avatar image
0 Votes"
PerHederos-6610 asked PerHederos-6610 answered

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

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
image.png (32.4 KiB)
image.png (31.0 KiB)
image.png (28.0 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

PerHederos-6610 avatar image
0 Votes"
PerHederos-6610 answered

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


image.png (18.9 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.