microsoftgraph / microsoftgraph/msgraph-sdk-java

Retrieve SharePoint Site ID from URL/Path Using Graph API Without Sites.Read.All Permission

Abierto
#2,448 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

status:waiting-for-triage type:feature
Lenguaje dominante
Java
Estrellas
444
Forks
154
Merge medio
18 h 28 min
PR fusionados (30 d)
4

Descripción

Is your feature request related to a problem? Please describe the problem.

Hi,

My Java application integrates with SharePoint using the Microsoft Graph API Java SDK to upload and download files from document libraries.

The end-user workflow is as follows:

  1. Select a SharePoint site from a list, or provide the relative site path (URL).
  2. Select a document library from the chosen site (we list all available libraries).
  3. Use a file browser to navigate through the contents and upload/download files or folders.

We’ve noticed that in step #1, listing available sites requires the Sites.Read.All or Sites.ReadWrite.All permissions. Even when trying to retrieve a Site ID from a known path, it requires one of these broad permissions.

However, many of our customers are unwilling to grant Sites.Read.All to our application due to its wide scope.
We would like to know if there is a way (via the API) to:

  • list only the sites our app has access to through Sites.Selected?
  • retrieve a Site ID using its name, URL, or relative path without needing Sites.Read.All?

Ideally, our app should be able to query only the sites explicitly granted through Sites.Selected, and retrieve the Site ID using a known path.

If this is currently not supported, could you please consider this feature? This capability would be very helpful, especially since many users find it challenging to manually extract the Site ID using browser requests like /api/site/id.

Thanks,
Avner

Describe the solution you'd like.
  • Retrieve the site ID from the relative Path
    and/or
  • Allow the existing list sites API to treat the Sites.Selected (rather than Sites.Read.All) permissions.
Additional context?

No response

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

Comience revisando los puntos de entrada del Microsoft Graph API Java SDK para enumerar sitios y recuperar un site ID por nombre, URL o ruta relativa, junto con el comportamiento del permiso Sites.Selected descrito aquí. Se considerará completado cuando se haya determinado si estas operaciones pueden admitirse sin Sites.Read.All y, si es así, se haya definido el comportamiento solicitado de la API y validado con una cobertura adecuada del SDK.

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

Evaluación

Stack tecnológico
java
Área
api, authorization
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
30/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.