在将以下发布请求发送到Microsoft Germany端点(https://graph.microsoft.de/v1.0)之后,我得到了400 UnableToDeserializePostBody,但是在将相同的请求发送到Microsoft Graph端点(https://graph.microsoft.com/v1.0)之后却收到201。 >
德国终点站有限制吗?
请求 POST https://graph.microsoft.de/v1.0/users/xxx/events/
{
"attendees":[],
"body":{
"content":"<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n<meta content=\"text/html; charset=iso-2022-jp\">\r\n<style type=\"text/css\" style=\"display:none\">\r\n<!--\r\np\r\n\t{margin-top:0;\r\n\tmargin-bottom:0}\r\n-->\r\n</style>\r\n</head>\r\n<body dir=\"ltr\">\r\n<div id=\"divtagdefaultwrapper\" dir=\"ltr\" style=\"font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif\">\r\n<p style=\"margin-top:0; margin-bottom:0\"><br>\r\n</p>\r\n</div>\r\n</body>\r\n</html>\r\n",
"contentType":"html"
},
"bodyPreview":"",
"categories":[],
"changeKey":"V3BbxVnFKUiKHwfECS7njQABscz/wA==",
"createdDateTime":"2020-06-22T08:04:02.7260413Z",
"end": {
"dateTime":"2020-06-23T00:30:00.0000000",
"timeZone":"UTC"
},
"hasAttachments":false,
"iCalUId":"",
"id":"AAMkADY5ODA5YjI4LTZlMmEtNDk5My1hNTcxLTFmMDJlMTFlM2ZmYQBGAAAAAADXELVefACVTqbk5n3dmlnfBwBXcFvFWcUpSIofB8QJLueNAAGx1uUKAABXcFvFWcUpSIofB8QJLueNAAGx1vTOAAA=",
"importance":"normal",
"isAllDay":false,
"isCancelled":false,
"isOrganizer":true,
"isReminderOn":true,
"lastModifiedDateTime":"2020-06-22T08:04:03.3837944Z",
"location":{
"address":{
"city":"",
"countryOrRegion":"",
"postalCode":"",
"state":"",
"street":""
},
"coordinates":{},
"locationType":"default",
"uniqueIdType":"unknown"
},
"onlineMeetingUrl":"",
"organizer":{
"emailAddress":{
"address":"a@b",
"name":"test"
}
},
"originalEndTimeZone":"Taipei Standard Time",
"originalStart":null,
"originalStartTimeZone":"Taipei Standard Time",
"recurrence":null,
"reminderMinutesBeforeStart":15,
"responseRequested":true,
"responseStatus":{
"response":"organizer",
"time":"0001-01-01T00:00:00Z"
},
"sensitivity":"normal",
"seriesMasterId":"",
"showAs":"busy",
"start":{
"dateTime":"2020-06-23T00:00:00.0000000",
"timeZone":"UTC"
},
"subject":"1",
"type":"singleInstance",
"webLink":"https://outlook.office.de/owa/?itemid=AAMkADY5ODA5YjI4LTZlMmEtNDk5My1hNTcxLTFmMDJlMTFlM2ZmYQBGAAAAAADXELVefACVTqbk5n3dmlnfBwBXcFvFWcUpSIofB8QJLueNAAGx1uUKAABXcFvFWcUpSIofB8QJLueNAAGx1vTOAAA%3D&exvsurl=1&path=/calendar/item"
}
来自德国端点的响应 400错误的请求
{
"error": {
"code": "UnableToDeserializePostBody",
"message": "were unable to deserialize ",
"innerError": {
"date": "2020-08-07T08:44:52",
"request-id": "ce4c6d23-9163-42a1-9839-787596f7533b"
}
}
}
答案 0 :(得分:0)
您现在可能已经放弃或修复了它,但是设置颜色时我遇到了这个错误。我使用了整数,但是当我更改为字符串时就可以了。
我注意到您已经"reminderMinutesBeforeStart":15
尝试使用"reminderMinutesBeforeStart":"15"
。