You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Microsoft Graph API创建Outlook笔记后无法打开求助

问题:通过Microsoft Graph API创建的Outlook笔记无法在网页端打开

我尝试通过Microsoft Graph API在Outlook中创建新笔记,Outlook 365网页端的笔记计数会随之增加,但无法打开这些笔记条目。以下是我使用的请求语法:

POST https://graph.microsoft.com/v1.0/me/mailFolders/notes/messages
Content-Type: application/json
{
    "@odata.etag": "W/\"CQAAABYAAACHCosUWr4XTJq6SF8dEwnxAAADJnO1\"",
    "id": "AAMkADQyNjE5ZDY0LWVkNzQtNGFhNi05NTYzLWJkNjQwMzM2ZTEzNQBGAAAAAAC3cPTGmC31SIR4_3GZ-iOkBwCHCosUWr4XTJq6SF8dEwnxAAAAAAERAACHCosUWr4XTJq6SF8dEwnxAAADKRJmAAA=",
    "createdDateTime": "2023-03-31T05:57:34Z",
    "lastModifiedDateTime": "2023-03-31T06:43:12Z",
    "changeKey": "CQAAABYAAACHCosUWr4XTJq6SF8dEwnxAAADJnO1",
    "categories": [],
    "receivedDateTime": "2023-03-31T05:59:09Z",
    "sentDateTime": "2023-03-31T05:57:34Z",
    "hasAttachments": false,
    "internetMessageId": "<PN0P287MB063006EDCDFEBA2259E57A40EF8F9@PN0P287MB0630.INDP287.PROD.OUTLOOK.COM>",
    "subject": "Test-4 with content",
    "bodyPreview": "Test-3 with contentOn-page optimization is the action that we apply directly to our webpage to increase its ranking on the search result page.On page SEO Factor  *   Website should be crawlable, User friendly URLs, Well target content, Image o",
    "importance": "normal",
    "parentFolderId": "AAMkADQyNjE5ZDY0LWVkNzQtNGFhNi05NTYzLWJkNjQwMzM2ZTEzNQAuAAAAAAC3cPTGmC31SIR4_3GZ-iOkAQCHCosUWr4XTJq6SF8dEwnxAAAAAAERAAA=",
    "conversationId": "AAQkADQyNjE5ZDY0LWVkNzQtNGFhNi05NTYzLWJkNjQwMzM2ZTEzNQAQAGiuY5VCyHRPNhnrEPSCfW0=",
    "conversationIndex": "AQHZY5WwjK0aw5xdoka025ThJey98Q==",
    "isDeliveryReceiptRequested": null,
    "isReadReceiptRequested": false,
    "isRead": true,
    "isDraft": false,
    "webLink": "https://outlook.office365.com/owa/?ItemID=AAMkADQyNjE5ZDY0LWVkNzQtNGFhNi05NTYzLWJkNjQwMzM2ZTEzNQBGAAAAAAC3cPTGmC31SIR4%2B3GZ%2FiOkBwCHCosUWr4XTJq6SF8dEwnxAAAAAAERAACHCosUWr4XTJq6SF8dEwnxAAADKRJmAAA%3D&exvsurl=1&viewmodel=ReadMessageItem",
    "inferenceClassification": "focused",
    "unsubscribeData": [],
    "unsubscribeEnabled": false,
    "mentionsPreview": null,
    "body": {
        "contentType": "html",
        "content": "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"><style><!--ul{list-style:none}html, body, div, span, h1, h2, h3, h4, h5, h6, p, ul, li{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline}--></style></head><body id=\"NotesClientContent\"><div><p dir=\"ltr\">Test-3 with content</p><p dir=\"ltr\"></p><p dir=\"ltr\">On-page optimization is the action that we apply directly to our webpage to increase its ranking on the search result page.</p><p dir=\"ltr\"></p><p dir=\"ltr\"><span style=\"font-weight:bold; font-style:italic; text-decoration:underline\">On page SEO Factor</span></p><p dir=\"ltr\"></p><ul dir=\"ltr\" style=\"padding:0px 20px\"><li style=\"list-style-type:disc\"><p dir=\"ltr\">Website should be crawlable, User friendly URLs, Well target content, Image optimization, Readability, CTR (Click through Rate), Mobile friendliness, Keyword optimization, Quality outbound link, Website structure, etc.</p></li></ul><p dir=\"ltr\"></p><p dir=\"ltr\"><span style=\"font-weight:bold; font-style:italic; text-decoration:underline\">Working process of Search engines</span></p><p dir=\"ltr\"></p><ul dir=\"ltr\" style=\"padding:0px 20px\"><li style=\"list-style-type:disc\"><p dir=\"ltr\">When a website publish then search engine crawler/spider crawled the site and add/indexed in local server along with category like news, sports, images etc. after that manage to Main server. Now algorithm work on these index and provides the ranking that user search on Google and other <span style=\"text-decoration:line-through\">search engines</span>.</p></li></ul></div></body></html>"
    },
    "toRecipients": [],
    "ccRecipients": [],
    "bccRecipients": [],
    "replyTo": [],
    "flag": {
        "flagStatus": "notFlagged"
    }
}

每次创建新条目时计数都会增加,但在Outlook网页端无法查看这些条目。请问是否需要设置扩展属性(extended property),或是我哪里操作有误?


问题原因与解决方案

  • 核心问题:你提交的请求体中包含了大量系统自动生成的字段(如@odata.etag、id、createdDateTime、receivedDateTime等),这些字段应由Graph API在创建时自动赋值,手动传入会导致Outlook客户端无法正确识别和渲染笔记条目。

  • 正确请求方式:创建笔记仅需传入必要字段,示例如下:

POST https://graph.microsoft.com/v1.0/me/mailFolders/notes/messages
Content-Type: application/json
{
    "subject": "Test-4 with content",
    "body": {
        "contentType": "html",
        "content": "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"></head><body id=\"NotesClientContent\"><div><p dir=\"ltr\">Test-3 with content</p><p dir=\"ltr\"></p><p dir=\"ltr\">On-page optimization is the action that we apply directly to our webpage to increase its ranking on the search result page.</p><p dir=\"ltr\"></p><p dir=\"ltr\"><span style=\"font-weight:bold; font-style:italic; text-decoration:underline\">On page SEO Factor</span></p><p dir=\"ltr\"></p><ul dir=\"ltr\" style=\"padding:0px 20px\"><li style=\"list-style-type:disc\"><p dir=\"ltr\">Website should be crawlable, User friendly URLs, Well target content, Image optimization, Readability, CTR (Click through Rate), Mobile friendliness, Keyword optimization, Quality outbound link, Website structure, etc.</p></li></ul><p dir=\"ltr\"></p><p dir=\"ltr\"><span style=\"font-weight:bold; font-style:italic; text-decoration:underline\">Working process of Search engines</span></p><p dir=\"ltr\"></p><ul dir=\"ltr\" style=\"padding:0px 20px\"><li style=\"list-style-type:disc\"><p dir=\"ltr\">When a website publish then search engine crawler/spider crawled the site and add/indexed in local server along with category like news, sports, images etc. after that manage to Main server. Now algorithm work on these index and provides the ranking that user search on Google and other <span style=\"text-decoration:line-through\">search engines</span>.</p></li></ul></div></body></html>"
    },
    "categories": []
}
  • 说明:无需设置特殊扩展属性,简化请求体后,创建的笔记即可在Outlook网页端正常打开查看。

内容的提问来源于stack exchange,提问作者Manoj Dwivedi

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.26 01:22:36