我使用以下JSON正文创建了Microsoft Graph请求:
{
"planId":"uiceFoBwgUmRrejVaf0z1ZcADEOr",
"title":"test task",
"assignments":{
"caf39f72-6600-41f7-a30a-2574cfa831af":{
"@odata.type":"#microsoft.graph.plannerAssignment",
"orderHint":" !"
}
},
"dueDateTime":{
"dateTime":"2021-08-29T04:00:00:00Z",
"timeZone":"GMT+1"
}
}
在获得授权的同时,我通过HTTP POST将正文发送到https://graph.microsoft.com/v1.0/planner/tasks。这是它给我的信息:
{
"error": {
"code": "",
"message": "The request is invalid:\r\nAn unexpected 'StartObject' node was found for property named 'dueDateTime' when reading from the JSON reader. A 'PrimitiveValue' node was expected.",
"innerError": {
"date": "2020-12-09T10:51:41",
"request-id": "f5acd6d0-f23a-48ac-ad14-5cb086695104",
"client-request-id": "11d32e3c-2093-0aba-5740-45174cec76ac"
}
}
}
这个错误是什么意思?我把dueDateTime
论点打错了吗?还是需要其他参数才能起作用?
提前致谢
计划者的到期日期是DateTimeOffset,您尝试传递的结构是DateTimeTimeZone。
您的输入应如下所示:
"dueDateTime":"2021-08-29T04:00:00+01:00",
您可以从此处的文档中了解有关属性及其类型的更多信息。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句