Microsoft graph api 带有到期日返回错误InvalidArgumentError标志的SendMail
我正试图发送一封带有标志的电子邮件,该标志有一个截止日期。 以下请求在图形浏览器中有效。Microsoft graph api 带有到期日返回错误InvalidArgumentError标志的SendMail,microsoft-graph-api,Microsoft Graph Api,我正试图发送一封带有标志的电子邮件,该标志有一个截止日期。 以下请求在图形浏览器中有效。 职位 并且具有以下有效负载的相同请求失败 { "message": { "subject": "Meet for lunch?", "body": { "contentType": "Text", "content": "The new cafeteria is open." }, "toRecipients": [ {
职位 并且具有以下有效负载的相同请求失败
{
"message": {
"subject": "Meet for lunch?",
"body": {
"contentType": "Text",
"content": "The new cafeteria is open."
},
"toRecipients": [
{
"emailAddress": {
"address": "vincent@baywet.onmicrosoft.com"
}
}
],
"flag": {
"flagStatus": "flagged",
"dueDateTime": {
"timeZone": "Pacific Standard Time",
"dateTime": "2019-01-25T19:58:27"
}
}
},
"saveToSentItems": "false"
}
显示以下错误消息
{
"error": {
"code": "ErrorInvalidArgument",
"message": "The request is invalid.",
"innerError": {
"request-id": "5e335c05-071b-4b23-8511-006db9e6e883",
"date": "2019-01-24T20:03:45"
}
}
}
请注意,唯一的区别是以下节点(截止日期)
根据,我应该传入一个datetimezone
对象,即使这篇特定文章没有示例,我的对象看起来也是正确的。中没有列出限制以及so,我想知道此有效负载有什么问题,以及如何在发送电子邮件时设置带有截止日期的标志?很抱歉回复太晚。9个月后,我终于得到了空气,和一位工程师一起工作。查看后端逻辑。必须同时设置开始日期和截止日期才能使其生效 所以你需要这样做
"flag": {
"flagStatus": "flagged",
"dueDateTime": {
"timeZone": "Pacific Standard Time",
"dateTime": "2019-12-25T19:58:27"
},
"startDateTime": {
"timeZone": "Pacific Standard Time",
"dateTime": "2019-11-25T19:58:27"
}
我将在此更新文档。我尝试指定首选outlook时区标题,以查看这是否有帮助。它没有改变任何东西。您能否准确地指定从Microsoft Graph返回的响应头,而不仅仅是响应体?客户端请求id:3f26a733-71b2-42bb-8d56-8f44d7eeb0d7内容类型:应用程序/json缓存控制:私有请求id:3f26a733-71b2-42bb-8d56-8f44d7eeb0d7
"dueDateTime": {
"timeZone": "Pacific Standard Time",
"dateTime": "2019-01-25T19:58:27"
}
"flag": {
"flagStatus": "flagged",
"dueDateTime": {
"timeZone": "Pacific Standard Time",
"dateTime": "2019-12-25T19:58:27"
},
"startDateTime": {
"timeZone": "Pacific Standard Time",
"dateTime": "2019-11-25T19:58:27"
}