microsoftgraph / microsoftgraph/msgraph-sdk-java

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

Abierto
#2,548 3 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Lenguaje dominante
Java
Estrellas
444
Forks
154
Merge medio
18 h 28 min
PR fusionados (30 d)
4

Descripción

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

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

No se identifica ningún archivo del repositorio ni ninguna prueba; comience con el endpoint documentado /drives/{drive-id}/root/delta y los encabezados Prefer indicados, usando la secuencia de tokens proporcionada para reproducir la respuesta de cuatro elementos. Se considera completado cuando el comportamiento del servicio o su documentación distingue claramente entre las carpetas compartidas directamente y las carpetas que solo están en la jerarquía, con el comportamiento esperado de las anotaciones verificado.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Área
api, cloud
Tipo de issue
Error
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Tranquilo
Claridad
Bastante claro
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.