Skip to main content

Notifications

Power Automate - Building Flows
Unanswered

How to delete a term in the term store via Power Automate

(0) ShareShare
ReportReport
Posted on by
I'm able to perform other CRUD operations on the term store, but I'm unable to delete a term from it.
 
An app has been created in AAD, and read/write/all permssions have been assigned for both SharePoint and Graph.  I'm able to get a bearer token in my workflow, so I'm guessing this has been set up correctly?  The account being used for the workflow actions has been explicitly given read/write permissions to the term store.  As I said, I'm able to perform the other CRUD actions, so I'm also guessing the permissions are set up correctly.
 
I've tried the below parameters in varying combinations in both the SharePoint and generic HTTP request actions.  I'm getting a range of errors, and I've added those to the URI's returning them.
 
URI's for bearer token:
1. https://login.microsoftonline.com/[SITE ID]/oauth2/token (no error)
2. https://login.microsoftonline.com/[SITE ID]/oauth2/v2.0/token (error: Invalid version: sites)
 
URI's for delete action:
1. https://graph.microsoft.com/beta/termStore/sets/[TERM SET ID]/terms/[TERM ID] (error: Either scp or roles claim need to be present in the token. * Since this was beta, I didn't investigate this and tried the other Graph URI)
2. https://graph.microsoft.com/sites/[SITE ID]/termStore/sets/[TERM SET ID]/terms/[TERM ID] (error: Access token validation failure. Invalid audience.)
3. /_api/v2.1/termStore/groups/[GROUP ID]/sets/[TERM SET ID]/terms/[TERM ID] (error: InternalServerError)
 
Method: DELETE
 
Headers:
1. Content-Type = application/json
2. Authorization = Bearer [BEARER TOKEN]
 
I appeciate any help you can provide.

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,445

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,741

Leaderboard