Update term in a term set

How to update an existing term in a term set in SharePoint Online using a Power Automate flow.

URI

_api/v2.1/termStore/groups/@{variables('TermGroupId')}/sets/@{variables('TermSetId')}/terms/@{variables('TermId')}

Headers

{
"Accept": "application/json;odata=verbose",
"Content-Type": "application/json;odata=verbose"
}

Body

{
"labels": [
{
"name": "Copilot Studio",
"isDefault": true,
"languageTag": "en-US"
}
]
}

Screenshot with example

Sample data
TermGroupId – f8d99e9e-f5eb-4d70-b170-f9abb6b4b109
TermSetId – 6698bd06-cb28-4d7a-9cd2-edb2f12df4c6
TermId – a6b33fc3-0205-4cca-b21f-40e45cc5d971
Term name – Copilot Studio

updatetermintermset

Copy/paste example

{"id":"0adf3578-acc0-4ca0-b132-c36f87efa538","brandColor":"#036C70","connectionReferences":{"shared_sharepointonline":{"connection":{"id":"/exp_sharedsharepointonline_e5efa"}}},"connectorDisplayName":"SharePoint","icon":"https://connectoricons-prod.azureedge.net/u/alexsp/sporelease/1.0.1682.3673/sharepointonline/icon.png","isTrigger":false,"operationName":"Send_an_HTTP_request_to_SharePoint","operationDefinition":{"type":"OpenApiConnection","inputs":{"host":{"connectionName":"shared_sharepointonline","operationId":"HttpRequest","apiId":"/providers/Microsoft.PowerApps/apis/shared_sharepointonline"},"parameters":{"dataset":"@parameters('SPOSiteCollection_PowerUsers (exp_SPOSiteCollection_PowerUsers)')","parameters/method":"PATCH","parameters/uri":"_api/v2.1/termStore/groups/@{variables('TermGroupId')}/sets/@{variables('TermSetId')}/terms/@{variables('TermId')}","parameters/headers":{"Accept":"application/json;odata=verbose","Content-Type":"application/json;odata=verbose"},"parameters/body":"{ \n\"labels\": [\n{\n\"name\": \"Copilot Studio\",\n\"isDefault\": true,\n\"languageTag\": \"en-US\"\n}\n]\n}"},"authentication":{"type":"Raw","value":"@json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$ConnectionKey']"}},"runAfter":{"Initialize_variable_-_TermId":["Succeeded"]},"metadata":{"operationMetadataId":"dc7a6a94-9e0e-4a22-a82f-329d363f67c1"}}}

Resources

Update term

That’s it, Happy testing!

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.