Hi @Amar Agnihotri ,
Thank you for the ask. Function Body seems incorrect. It should be a valid JSON. Would you please try something like:
{
"name": "@{variables('Data2')}"
}
Hope this helps. Thank you!
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I have this pipeline
This is my azure function which is converting the string to valid json string
This function will take string output from "Change Array To string " activity and will convert this string to a valid json format. After that i will copy that string to datalalke.
I am unable to get that how can i pass the output to azure function activity for POST request
"Change Array To String" activity is holding an output in Data2 variable as shown
Now i want to pass this value of Data2 varibale to name variable in azure function . I tried this in azure function activity
But My function is not able to run showing the below error -
Can anyone suggest something to resolve this ?
Hi @Amar Agnihotri ,
Thank you for the ask. Function Body seems incorrect. It should be a valid JSON. Would you please try something like:
{
"name": "@{variables('Data2')}"
}
Hope this helps. Thank you!
Hi @Nasreen Akter
Thanks for the reply. Let me show you where am i stuck at right now -
I create my azure function in Visual studio and published it to azure. The function is taking string and converting it to the json format .
This is the input string to the function -
I put this input to check azure function in portal
and this is the output of azure function which is a valid json format
I checked this function in Postman too and it is working fine. You can see i checked the output in jsonlint.com for the valid format and we are getting what we want
In both the azure portal and postman my function is working fine but when i checked this in adf pipeline in azure function activity it is not working it is returning the same input string . I believe it is not getting the value for the name . You can see that the function is being called -
but it is not returning the valid output
I am not able to understand why it is not working fine in function activity in adf. You can see that i passed the hard coded value in the body in the same way as i did in azure portal and postman -
Am i doing any mistake in the body section to pass the value for the name variable of function ?
This is my azure function code -
Can you please tell me what i am doing wrong while making a call in adf.
Hi @Nasreen Akter and @AnnuKumari-MSFT
Here is the answer for this question .