0
votes

I am new to Azure Data Factory and I am now stuck at last step to finish my current task.

There are few REST API's that I need to call from ADF using Web Activity but before I make to REST API POST call, in this POST call I need to pass user credentials to be fetched from key vault and passing into BODY section. Once this POST request is issued I need to get authentication token from that server, hence as it is working in hard coded fashion. But now I want to fetch userId and password from Azure Key Vault and I then need to pass it to Web Activity.

NOTE : I do not want to use MSI option.

Could you please help on retrieving userId and password from Azure Key Vault for Web Activity to pass this as part of authentication?

1

1 Answers

3
votes

You can follow these steps to achieve what you want:

  1. Save the userid and password in the azure keyvault. And then give your azure datafactory authority to access the keyvault:

I think you know how to add keyvault value, so I just show how to give the access authority. enter image description here

enter image description here

enter image description here

And choose 'Add'. And dont foeget to save the edit.

  1. The second step is about the web activity in ADF. You should create a web activity first.

enter image description here

enter image description here

enter image description here

Then, you can use a Set variable activity to get the value.

enter image description here

The value of the activity is @activity('yourwebactivityname').output.value

This is my pipeline:

enter image description here

And I can get the value:

enter image description here

For more information, please have a look of the below document:

https://docs.microsoft.com/en-us/azure/data-factory/how-to-use-azure-key-vault-secrets-pipeline-activities