Can someone offer guidance on why the following code does not update the title field of a SharePoint list item?
public void setItemTitle(String siteId, String listId, ListItem item)
{
ListItem updateItem = new ListItem();
var updateRequest = graph.getGraphClient().sites(siteId).lists(listId).items(item.id).fields().buildRequest();
updateRequest.addHeader("If-Match", item.getRawObject().get("@odata.etag").getAsString());
updateRequest.addHeader("prefer", "return=representation");
JsonObject json= new JsonObject();
json.addProperty("Title", "updated title");
FieldValueSet fieldValueSet = new FieldValueSet();
fieldValueSet.setRawObject(null, json);
FieldValueSet response = updateRequest.patch(fieldValueSet);
}
The field does not get updated in the response object, nor in SharePoint. Thanks in advance