microsoftgraph / microsoftgraph/msgraph-sdk-java

@microsoft.graph.sharedChanged annotation not set on folders in delta query with deltashowsharingchanges

未關閉
#2,548 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 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

  1. Get a latest delta token:

    GET /drives/{drive-id}/root/delta?token=latest
    Headers: Prefer: deltashowremovedasdeleted, deltatraversepermissiongaps, deltashowsharingchanges
    
  2. Share a file located inside a folder hierarchy (e.g., root/folder/sub-folder/sample.jpg) with a specific user.

  3. 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.sharedChanged set 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

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

未識別出任何儲存庫檔案或測試;從已記錄的 /drives/{drive-id}/root/delta 端點和列出的 Prefer 標頭開始,使用提供的權杖序列重現四項回應。當服務行為或其文件明確區分直接共用的資料夾與僅存在於階層中的資料夾,且預期的註解行為已獲得驗證時,即視為完成。

由索引模型根據 Issue 內容生成。

評估

領域
api, cloud
Issue 類型
缺陷
難度
5/5
預估耗時
一週以上
活躍度
冷清
描述清晰度
基本清楚
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。