Reputation: 45
I have the ADF pipeline as above. I want to perform a api call to Azure function which looks like
"https://<Function app>.azurewebsites.net/api/process/{country_code}?code=<Master Key>
I want to pass the Master key from Azure key vault secret without hardcoding it directly in the URL section and make a post request with the payload passed in the body. is that possible to do? Sorry If this is a basic question, I just have started working with ADF?
Upvotes: 0
Views: 3329
Reputation: 2662
You can use the Key vault rest API to fetch the master key after your key vault it Key vault Rest API doc.
First give your ADF access to your key vault. You can do this use IAM RBAC or Access policies. Use a Webactivity to do a GET API call to fetch the Secret.
You can then use your retrieved secret in further activities like shown below by using dynamic content "@activity('Web1').output.value".
I would recommend you to switch on Secure inputs and outputs for the activities. This will prevent the the secret from being visible from anyone else who is looking at the historical runs. You can do this after you have set it up and finished debugging and testing.
Upvotes: 1