Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

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

Offen
#2,448 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
30/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
java
Bereich
api, authorization

Rechercherichtung

Beginnen Sie mit der Prüfung der Einstiegspunkte des Microsoft Graph API Java SDK zum Auflisten von Sites und zum Abrufen einer site ID anhand des Namens, der URL oder des relativen Pfads sowie des hier beschriebenen Berechtigungsverhaltens von Sites.Selected. Als erledigt gilt die Aufgabe, wenn festgestellt wurde, ob diese Vorgänge ohne Sites.Read.All unterstützt werden können, und, falls ja, das gewünschte API-Verhalten definiert und mit geeigneter SDK-Abdeckung validiert wurde.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

status:waiting-for-triage type:feature
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

Vorherrschende Sprache
Java
Sterne
444
Forks
154
Ø Merge
18 Std. 28 Min.
Gemergte PRs (30 T.)
4

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus microsoftgraph/msgraph-sdk-java

Alle Issues in microsoftgraph/msgraph-sdk-java

Ähnliche Issues

Weitere Issues zu Java

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.