web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Azure DevOps Connector...
Power Automate
Answered

Azure DevOps Connector - Create a Bug in @CurrentIteration

(0) ShareShare
ReportReport
Posted on by 5

I am using the Azure DevOps connector with Power Automate to create a cloud flow that creates a bug in an Azure DevOps project when an email is received with a certain subject. When I specify an iteration name manually with text the flow works as expected. I want to dynamically have the bug created in the current iteration/sprint by using the @CurrentIteration macro, but am getting an error when testing.

 

I have the Iteration Path parameter of the create a new work item's advanced properties set as (and passed as a string in "quotes") in the raw inputs. My project name is White Wilson and the default project team is White Wilson Team.

 

@CurrentIteration('[White Wilson]/White Wilson Team')

 

  

This is the error message I receive:

 

TF401347: Invalid tree name given for work item -1, field 'System.IterationPath'.
Azure DevOps

 

 

These are the docs I read about the current iteration macro in Azure DevOps: https://docs.microsoft.com/en-us/azure/devops/boards/queries/query-by-date-or-current-iteration?view=azure-devops

 

And these are the docs the error referred me to: https://docs.microsoft.com/en-us/connectors/visualstudioteamservices/#known-issues-and-limitations

Categories:
I have the same question (0)
  • Verified answer
    Expiscornovus Profile Picture
    33,498 Most Valuable Professional on at

    Hi @lmcconnell1665,

     

    You could use a separate Send an HTTP request to Azure DevOps action for this to retrieve the current iteration, together with the following Azure DevOps Services REST API 6.0 list iteration call, https://docs.microsoft.com/en-us/rest/api/azure/devops/work/iterations/list?view=azure-devops-rest-6.0 

     

     

    GET https://dev.azure.com/fabrikam/Fabrikam-Fiber/_apis/work/teamsettings/iterations?$timeframe=current&api-version=6.0

     

     

     

    getcurrentiteration.png

     

    In the Create a Work item action you can use the following expression in the Iteration Path:

     

     

    outputs('Send_an_HTTP_request_to_Azure_DevOps_-_Get_Current_Iteration')?['body']['value'][0]['path']

     

     

     

    expression_currentiterationpath.png

     

    Hope this helps a bit.

  • lmcconnell1665 Profile Picture
    5 on at

    This worked perfectly! Thank you.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 112 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 52

#3
Ellis Karim Profile Picture

Ellis Karim 51 Super User 2026 Season 1

Last 30 days Overall leaderboard