microsoftgraph / microsoftgraph/msgraph-sdk-java
@microsoft.graph.sharedChanged annotation not set on folders in delta query with deltashowsharingchanges
还没有人认领这个 Issue。
- 主要语言
- Java
- 星标
- 444
- 派生
- 154
- 平均合并
- 18 小时 28 分钟
- 30 天内合并 PR
- 4
描述
Description
When using the delta query API with Prefer: deltashowremovedasdeleted, deltatraversepermissiongaps, deltashowsharingchanges headers, the @microsoft.graph.sharedChanged OData annotation is only set on files, never on folders — even when folders appear in the delta response with a shared facet.
This is an API behavior issue, not SDK-specific, but we're filing here as the docs repo has issues disabled.
Steps to reproduce
-
Get a latest delta token:
GET /drives/{drive-id}/root/delta?token=latest Headers: Prefer: deltashowremovedasdeleted, deltatraversepermissiongaps, deltashowsharingchanges -
Share a file located inside a folder hierarchy (e.g.,
root/folder/sub-folder/sample.jpg) with a specific user. -
Query delta with the token from step 1:
GET /drives/{drive-id}/root/delta?token={token} Headers: Prefer: deltashowremovedasdeleted, deltatraversepermissiongaps, deltashowsharingchanges
Actual result
The response contains 4 items. Only the file has @microsoft.graph.sharedChanged, the parent folders do not:
FOLDER root — @microsoft.graph.sharedChanged: NOT PRESENT
FOLDER folder — @microsoft.graph.sharedChanged: NOT PRESENT, shared: {scope: users}
FOLDER sub-folder — @microsoft.graph.sharedChanged: NOT PRESENT
FILE sample.jpg — @microsoft.graph.sharedChanged: true, shared: {scope: users}
Expected result
Per the documentation:
"all items that appear in the delta query response due to permission changes have the @microsoft.graph.sharedChanged: True OData annotation"
Parent folders that appear as hierarchy context (not due to their own permission change) should either:
- Have
@microsoft.graph.sharedChangedset when they are directly shared, OR - Be excluded from the response when they are only hierarchy context
Currently, folders never receive the annotation regardless of whether they were directly shared or appear as parent hierarchy. This makes it impossible to distinguish parent folder noise from real folder permission changes.
Additional testing
Tested all header combinations against the same delta token:
| Headers | Result |
|---|---|
| deltashowremovedasdeleted, deltatraversepermissiongaps, deltashowsharingchanges | 4 items, annotation only on file |
| Same + hierarchicalsharing | Identical 4 items |
| Same + deltaExcludeParent: true | Identical 4 items |
| Only deltashowsharingchanges | Identical 4 items |
| No Prefer headers | 0 items |
Environment
- API version: v1.0
- Authentication: Application permissions (client credentials)
- Service: SharePoint Online
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
未识别出任何仓库文件或测试;从已记录的 /drives/{drive-id}/root/delta 端点和列出的 Prefer 标头开始,使用提供的令牌序列重现四项响应。当服务行为或其文档明确区分直接共享的文件夹与仅存在于层级结构中的文件夹,并且预期的注释行为已得到验证时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 领域
- api, cloud
- Issue 类型
- 缺陷
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100