Nov 15 2023 11:47 PM - edited Nov 15 2023 11:54 PM
I tried to overwrite a document using the Graph API.
https://learn.microsoft.com/en-us/graph/api/driveitem-createuploadsession?view=graph-rest-1.0
Sensitivity label document overwrite failed.
(Sensitivity label document overwrite was successful through SharePoint in the web browser.)
UploadSession was created successfully.
Request | POST /sites/{site-id}/drive/items/{item-id}/createUploadSession |
Response | 200 OK { |
But upload using session failed.
Request | PUT https://socamresearch.sharepoint.com/sites/test111/_api/v2.0/drive/items/014IDU5ZIHHNOKSWVRN5DZFC2P4... {file content} |
Response | 403 Forbidden { "error": { "code": "notAllowed", "message": "This operation has been disabled by policy" } } |
Only sensitivity label documents in SharePoint failed.
(The document without sensitivity label is uploaded(overwrited) successfully through the graph API.)
I referred to the URL below but couldn't find the answer I needed.
Replace content of file, that has a protection sensitivity label · Community (microsoft.com)
An error message occurred: "This operation has been disabled by policy"
What is this policy?
Is there a way to change the policy?
How do I overwrite a document with sensitivity label using the Graph API?
Thank you