【发布时间】:2019-10-13 21:10:34
【问题描述】:
我正在尝试更新列表项的值(类型为超链接或图片)。执行 GET 请求时,数据返回正常,但是当我尝试创建项目或使用值更新它时,我最终得到以下结果:
{
"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": "d12dfb12-a068-4621-9f27-d284e4635060",
"date": "2019-05-28T08:52:51"
}
}
}
POST/PATCH 请求转到:
https://graph.microsoft.com/v1.0/sites/<siteid>/lists/<listid>/items/
并包含一个简单的 JSON(在 PATCH 的情况下):
{
"WebPage":
{
"Description": "Microsoft Graph",
"Url": "http://graph.microsoft.com"
}
}
知道我做错了什么吗?我尝试使用 .NET SDK 和 Graph Explorer 并以同样的错误结束...
【问题讨论】:
标签: microsoft-graph-api microsoft-graph-sdks