Search code examples
azure-devopsazure-logic-apps

Generate workflow in current devops sprint through logic apps


Good afternoon,

I have created a logic app that generates workitem on my devops board everytime a client secret expires. The only part that I do not know how to solve is how to get that workitem or task in my current sprint.

Is there some code I can add, or anything else to make it calculate/generate what the current sprint is.

I've tried looking up on what to do, but couldn't really find anything. I do get it in my workitems overview, but now I just want to have it in my current sprint.


Solution

  • Is there some code I can add, or anything else to make it calculate/generate what the current sprint is.

    You can get the current iteration via rest api, $timeframe is set as current:

    GET https://dev.azure.com/{org}/{project}/_apis/work/teamsettings/iterations?$timeframe=current&api-version=7.1-preview.1
    

    In logic app, you can send http request with above rest api url, parse the iteration name to next step for workitem creation.