Parameterized authorization credentials in web activity ADF

Viewed 969

I try to parametrize Web activity authorization. I have created two parameters User_Name and Pass, type of String. Assign parameters value to auth. credential with this part of json code in adf pipeline.

enter image description here

Properties in the web activity settings tab look like this.

enter image description here

I have got authentication error when trying to execute the pipeline, the user name property has got a correct value but the password was bad. This is error code message: "errorCode": "2108" Authentication_InvalidCredentials","message":"The server has rejected the client credentials.

Any help will be appreciated

2 Answers

It is not recommended practice to parameterize passwords or secrets. Store all connection strings in Azure Key Vault instead, and parameterize the Secret Name.

As a rule of thumb, things that can have parameterized content are those fields which accept dynamic input.

These tend to have text Add dynamic content [Alt+P] text below them when you click on the input box.

enter image description here

User name and password in basic authentication cannot be parameterized directly but there is a way.

Choose Authentication as None in the settings but provide authentication information in header whose value can be parameterized. See the screenshot below.

enter image description here

Related