Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,003 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
There is an example from Graph REST API v1.0:
// Code snippets are only available for the latest version. Current version is 5.x
var graphClient = new GraphServiceClient(requestAdapter);
var requestBody = new ListItem
{
Fields = new FieldValueSet
{
AdditionalData = new Dictionary<string, object>
{
{
"Title" , "Widget"
},
{
"Color" , "Purple"
},
{
"Weight" , 32
},
},
},
};
var result = await graphClient.Sites["{site-id}"].Lists["{list-id}"].Items.PostAsync(requestBody);
You can find this example here:
https://learn.microsoft.com/en-us/graph/api/listitem-create?view=graph-rest-1.0&tabs=csharp
The exception shows follow message:
What is root cause here?