Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ToddChitt
Super User
Super User

Set Pipeline Return Code using Dynamic Content

I have a pipeline that has one job: use a Web activity to get an Access Token to be used in other Web activities. Those other web activities in other pipelines so to simplify the design, I want to call the first pipeline from within the second (and many other) pipeline(s). So in the first pipeline, I have a task that sets the Pipeline return value, and for the Value, I put in the dynamic content just as I would if I was setting a Pipeline variable: @activity('Request an Access Token').output.access_token

Note that the dynamic content expression yields the proper value if it is used to set a pipeline varialbe, but when used to set a return code, the result is simple the literal expression of "@activity('Request an Access Token').output.access_token".

 

Question, how do I set a pipeline return value using dynamic content?




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





1 ACCEPTED SOLUTION
spencer_sa
Super User
Super User

Going to take a wild guess here.
Have you changed the type of the pipeline return value to 'Expression' instead of 'string'?

spencer_sa_0-1744319852354.png


I did a simple 2 pipeline workflow, the first calls the second and sets a variable based on the return value from the second.  (the second pipeline just has a Get Metadata step and outputs that as its return value.

Inner pipeline - you've seen the Set Variable in the picture above.

spencer_sa_1-1744320472797.png

Outer pipeline

spencer_sa_2-1744320534865.png

Outer set variable

spencer_sa_4-1744320645416.png


And the audit result

spencer_sa_5-1744320723733.png


If this helps, please consider Accepting as a Solution to help others find it more easily.

View solution in original post

2 REPLIES 2
spencer_sa
Super User
Super User

Going to take a wild guess here.
Have you changed the type of the pipeline return value to 'Expression' instead of 'string'?

spencer_sa_0-1744319852354.png


I did a simple 2 pipeline workflow, the first calls the second and sets a variable based on the return value from the second.  (the second pipeline just has a Get Metadata step and outputs that as its return value.

Inner pipeline - you've seen the Set Variable in the picture above.

spencer_sa_1-1744320472797.png

Outer pipeline

spencer_sa_2-1744320534865.png

Outer set variable

spencer_sa_4-1744320645416.png


And the audit result

spencer_sa_5-1744320723733.png


If this helps, please consider Accepting as a Solution to help others find it more easily.

Thanks, while I have not tried it yet, I'm 99% sure that is what I missed.

 

ToddChitt_0-1744368329839.jpeg

 

Thanks!

 




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





Helpful resources

Announcements
December Fabric Update Carousel

Fabric Monthly Update - December 2025

Check out the December 2025 Fabric Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors