I am trying to update SharePoint's DocumentSet metadata using below code, the call returns 200OK, but nothing is updated. What is wrong with the below code?
var driveItem = new DriveItem
{
Name = "test01",
ListItem = new ListItem
{
Fields = new FieldValueSet
{
AdditionalData = new Dictionary<string, object>
{
{
"CompanyCode" , "test01"
},
{
"CaseStatus" , "InProgress"
}
}
}
}
};
GetGraphClient().Drives[driveId].Root.ItemWithPath(documentSetName).PatchAsync(driveItem);
Note:
- I have read that it is possible to do this update using
lists[listID]/items[itemID], this approach requires 2 calls, first call to get the ItemId, subsequent to update - this would cause performance issues when there many documentsets to be updated.
- In Graph SDK 3.4 version it was possible to update fields using
.ListItem.Fields.Request().UpdateAsync - the SDK version 5.7 does not have similar capability.