microsoftgraph / microsoftgraph/msgraph-sdk-java

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

未關閉
#2,448 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

status:waiting-for-triage type:feature
主要語言
Java
星號
444
分支
154
平均合併
18 小時 28 分鐘
30 天內合併 PR
4

描述

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

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

首先,檢視 Microsoft Graph API Java SDK 中用於列出網站,以及依名稱、URL 或相對路徑取得 site ID 的進入點,同時檢視此處所述的 Sites.Selected 權限行為。完成的標準是確認這些操作是否能在不使用 Sites.Read.All 的情況下獲得支援;如果可以,則定義所要求的 API 行為,並以適當的 SDK 覆蓋範圍進行驗證。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
java
領域
api, authorization
Issue 類型
功能
難度
5/5
預估耗時
一週以上
活躍度
停滯
描述清晰度
基本清楚
新手友好度
30/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。