microsoftgraph / microsoftgraph/msgraph-sdk-java

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

オープン
#2,548 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Java
スター
444
フォーク
154
平均マージ
18時間 28分
マージ済み PR(30日)
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. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

リポジトリのファイルもテストも特定されていません。まず、文書化されている /drives/{drive-id}/root/delta エンドポイントと記載されている Prefer ヘッダーを使い、提供されたトークン列で4項目のレスポンスを再現してください。サービスの動作またはそのドキュメントで、直接共有されたフォルダーと階層にのみ存在するフォルダーが明確に区別され、期待されるアノテーションの動作が検証されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

領域
api, cloud
issue の種類
バグ
難易度
5/5
見積もり時間
1週間以上
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。