【发布时间】:2019-10-02 18:04:00
【问题描述】:
我正在使用 Microsoft Graph API 开发 MS Sharepoint。我用 .Net Core v2.1 调用 MS Graph API。
我想在其中一列是图像列的 Sharepoint 列表上执行 POST 请求,但我找不到有关如何执行此操作的文档...请问有人知道更多有关如何执行此操作的信息吗?
更新:
我看到了这个post,我改变了我的json:
{
"fields": {
"Title": "Test",
"Photo": {
"Url": "https://myurl/picture.jpg",
"Description":"This is my picture"
}
}
}
但是我有这个错误信息:
{
"error": {
"code": "-1, Microsoft.SharePoint.Client.InvalidClientQueryException",
"message": "A value without a type name was found and no expected type is available. When the model is specified, each value in the payload must have a type which can be either specified in the payload, explicitly by the caller or implicitly inferred from the parent value.",
"innerError": {
"request-id": "34773f4f-131f-4249-8a03-b8a820ba4a6b",
"date": "2019-05-16T13:26:17"
}
}
}
它似乎期望 Photo 的值是 PrimitiveValue 而不是对象...
【问题讨论】:
标签: c# sharepoint microsoft-graph-api .net-core-2.1