Unable to Include Message Body in Microsoft Graph Subscription Resource URL

未关闭
#1,630 1 条评论 3 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
typescript
领域
api

调研方向

Start with the Microsoft Graph subscription resource URL documentation and compare its supported query parameters with the posted payload, especially $select=body and $select=bodyPreview. Check the linked Stack Overflow discussion for context. Done means documenting a supported way to receive the full body or clearly confirming the API limitation and expected alternative.

由索引模型根据 Issue 内容生成。

描述

Description

I'm encountering an issue while attempting to create a subscription to receive change notifications, including resource data, in the Microsoft Graph API. Here's the payload I'm using:

{
    "changeType": "created",
    "notificationUrl": "<URL>",
    "resource": "me/mailFolders('Inbox')/messages?$select=body",
    "expirationDateTime": "2024-02-26T21:00:00.000Z",
    "latestSupportedTlsVersion": "v1_2",
    "includeResourceData": "true",
    "encryptionCertificate": "<SOME VALUE>",
    "encryptionCertificateId": "<SOME VALUE>"
}

However, upon sending a POST request with this payload, I'm encountering the following error message:

$top, $skip, $orderby, $select=body,uniqueBody and $expand other than singleValueExtendedProperties,multiValueExtendedProperties are not supported in subscription resource Url.

This error suggests that including $select=body in the resource URL is not permitted. If I exclude $select=body, I encounter a different error:

"select clause should be present in query string to support rich notifications"

This indicates that a select clause is required in the query string to support rich notifications.
Additionally, when I attempted to use $select=bodyPreview, I only received a truncated version of the body limited to 255 characters.

My objective is to receive change notifications including the entire body of the resource. I'm seeking guidance on how to achieve this.

I also created a post on StackOverFlow : https://stackoverflow.com/questions/78057126/select-body-not-working-while-creating-subscription-microsoft-graph-api

主要语言
TypeScript
星标
833
派生
240
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoftgraph/msgraph-sdk-javascript 的其他 Issue

查看 microsoftgraph/msgraph-sdk-javascript 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。