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 / How to remove tags fro...
Power Automate
Unanswered

How to remove tags from work items in Azure Devops

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

Removing tags from work items should be straight forward using the "update a work item" operation, which lets you choose to Append, Replace, or Remove tags. However since a week or so, this functionality is broken. I've posted about it here.

 

How or why "premium" functions in PowerAutomate can suddenly get borked for more than a week withour fixing and what that means for your business continuity, is perhaps a discussion for another day. I've been in touch with the Azure Devops devs and it seems that the API works fine, so I've tried to create a workaround using the "send an HTTP request to Azure Devops" operation, which I'm sharing here.

 

The problem with HTTP requests is that all tags in a work item form a single string. You can add an extra tag easily, but you can't remove them. You can only remove the entire string, thereby removing all tags.

So the strategy is:

  1. get the string with all the current tags
  2. split it up and filter out the tags to be removed
  3. Build a new string with the remaining tags
  4. Remove all the tags from the work item
  5. Add the new string to the work item

In this example I'm removing tags from features that I've selected via a query.

First we initiate an empty variable (TagString) that we'll use to build up a string with all the tags that shouldn't be removed.

For each feature from the query result we get the details, so we can find the tags.

JeroenE_0-1629450836072.png

 

Now we do another "apply to each" loop named SplitTags; for the output we choose a split function:

split(outputs('Feature_Details')?['body/fields/System_Tags'],';')

The body/fields/system_tags string take the form "tag1; tag2; tag3;" so this function splits up that string into individual tags; the subsequent logic is applied to those tags individually.

We can now use a condition (Remove unwanted tags) to filter out any tags we want removed with multiple OR-statements. (In this example, MyTag and Tag1 are removed.)

If the condition is false then the tag should not be removed, so we append that tag to the TagString variable with a ';' stuck at the end, using an "append to string variable" operation.

JeroenE_1-1629451338576.png

 

All we have to do now is replace the existing body/fields/system_tags string value with the TagString value, using HTTP requests:

First remove all tags from the work item, then add the ones that need to remain, using the variable. At the end, empty the variable so that's it's ready for the next work item that needs some of its tags removed.

 

JeroenE_2-1629452571340.png

 

 

 

 

Categories:
I have the same question (0)

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
Haque Profile Picture

Haque 286

#2
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard