microsoftgraph / microsoftgraph/msgraph-sdk-java

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

Aperta
#2,448 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

status:waiting-for-triage type:feature
Lingua principale
Java
Stelle
444
Fork
154
Merge medio
18h 28m
PR unite (30g)
4

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Iniziate esaminando i punti di ingresso del Microsoft Graph API Java SDK per elencare i siti e recuperare un site ID in base al nome, all’URL o al percorso relativo, insieme al comportamento dell’autorizzazione Sites.Selected descritto qui. Il lavoro sarà considerato completato quando sarà stato stabilito se queste operazioni possono essere supportate senza Sites.Read.All e, in tal caso, saranno stati definiti il comportamento API richiesto e la relativa validazione con un’adeguata copertura dell’SDK.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
api, authorization
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.