Forum Discussion

manuj's avatar
manuj
Copper Contributor
Nov 13, 2025

User Properties of Activities in ADF: How to add dynamic content in it?

On ADF, I am using a for each loop in which I am using an Execute Pipeline Activity which is getting executed for different iterations as per the values of the items provided to the For-Each Loop.

I am stuck on a scenario which requires me to add the Dynamic Content Expression in the User Properties of individual activities of ADF. Specific to my case, I want to add the Dynamic Content Expression in the User Properties of Execute Pipeline Activity so that I get to individual runs of these activities on Azure Monitor with a specific label attached to it through its User Properties.

The necessity to add the Dynamic Content Expression in the User Properties is due to the reason that each execution in respective iterations of these activities corresponds to a particular Step from a set of Steps configured for the Data Load Job as a whole, which has been orchestrated through ADF. To identify the association with the respective Job-Step, I require to add Dynamic Content Expression in its User Properties.

 

Any sort of response regarding this is highly appreciated.

 

Thank You!

1 Reply

  • Yes—User Properties are the right feature, and their values can be expressions. In the Execute Pipeline activity inside the ForEach, open User properties, add a key such as JobStep, then use Add dynamic content for its value. For an array of objects, for example:

     

    @string(item().StepName)

     

    If the loop item is already the step name, use @string(item()).

     

    Publish and run the pipeline, then open Monitor > Pipeline runs > Activity runs. Show the User properties column; each Execute Pipeline run should carry the resolved value for that iteration. User properties are activity-level key/value pairs, with a maximum of five per activity, so keep the key static and make the value dynamic.

     

    If you export diagnostics to Log Analytics, the same information is written under UserProperties as dynamic JSON, which you can parse or filter. One caveat: this labels the parent Execute Pipeline activity run; it does not rename the invoked child pipeline run. Pass the same value as a child-pipeline parameter if you need correlation inside the child.