0

I'm trying to remove a compliance tag from an item in SharePoint with the following REST call:

{
"uri": "https://xxxxx/sites/xxxxxx/_api/Web/Lists(guid'xxxx')/Items(xxx)/SetComplianceTag()",
"method": "DELETE",
"headers": {
    "Accept": "application/json;odata=verbose",
    "Content-type": "application/json;odata=verbose",
    "IF-MATCH": "*",
    "X-HTTP-Method": "MERGE"
},
"authentication": {
    "tenant": "xxxxx",
    "audience": "https://xxxxx.sharepoint.com",
    "clientId": "xxxx",
    "pfx": "*sanitized*",
    "password": "",
    "type": "ActiveDirectoryOAuth"
},
"body": {
    "complianceTag": "",
    "isEventBasedTag": false,
    "isTagPolicyHold": false,
    "isTagPolicyRecord": false,
    "isTagSuperLock": false
}

When I use an app registration I get an error saying that the retention label prevents me from doing any actions on this item (which is why I want to take it off). It leads me to believe that the app registration I am using doesn't have the right roles/priviliges. I'm at a loss as I have given the registration the sites.fullcontrol.all role (which I assume is the highest).

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.