ADF LinkedServer Token question

John K 186 Reputation points
2022-04-14T05:29:58.76+00:00

Hi,

I want to create a parameter in linked service for REST for Token .
However I cant see how can I use that parameter in header

I can see option to add azure key vault value. But my token needs to be provided every time I call the API and use this linked service in the pipeline.. How to parametrize the token in linked service?

192945-image.png

Azure Data Lake Storage
Azure Data Lake Storage
An Azure service that provides an enterprise-wide hyper-scale repository for big data analytic workloads and is integrated with Azure Blob Storage.
1,337 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,520 questions
{count} votes

Accepted answer
  1. ShaikMaheer-MSFT 37,896 Reputation points Microsoft Employee
    2022-04-18T10:59:01.797+00:00

    Hi @John K ,

    Thank you for posting query in Microsoft Q&A platform.

    If your Token value is going to be constant all the time, then you should consider storing it in Azure Key vault secret and use that Azure Key vault secret name as value in linked service.
    193760-image.png

    If you are going to get token value dynamically and wants to pass that during runtime in source transformation, then create a parameter in data flow and use that parameter as value in Source transformation headers. Make sure to pass your token value into data flow parameter when calling Data flow using Data flow activity.

    In your case, it says 401 error, that means the client request has not been completed because it lacks valid authentication credentials for the requested resource. So I believe either we are not passing valid token or we are not passing token in proper way. Kindly re-check above points in your case and let us know how it goes?

    Also, kindly check using your token in any other API tool(such as postman) to make API and see how it behaves there?


1 additional answer

Sort by: Most helpful
  1. AaronHughes 391 Reputation points
    2022-04-20T08:15:36.647+00:00

    to parameterise you can upload the token to the keyvault and then parameter pass the secret name in the linked service

    0 comments No comments