I'm trying to use microsoft Graph library in C# to insert a new row in a list in Sharepoint. the row must be under a subfolder of the list, but i can't find out how to do it through GraphServiceClient.
var listItems = await _graphClient.Sites[siteId].Lists[listId].Items.GetAsync();
foreach (var item in listItems.Value)
{
_logger.LogInformation($"Item: {item.Id}");
}
var newItem = new ListItem
{
Fields = new FieldValueSet
{
AdditionalData = new Dictionary<string, object>
{
{ "Title", "multiply favor" },
{ "Value", 7.5 },
{ "OverallScore", true },
{ "EmailId", "4"},
},
},
};
var listItemCreated = await _graphClient.Sites[siteId].Lists[listId].Items.PostAsync(newItem);
i'm currently able to create an item in
/sites/<site-name>/Lists/<list-name>
but i want to write directly in
/sites/<site-name>/Lists/<list-name>/<sub-list-name