microsoftgraph / microsoftgraph/msgraph-sdk-java
Retrieve SharePoint Site ID from URL/Path Using Graph API Without Sites.Read.All Permission
还没有人认领这个 Issue。
- 主要语言
- 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:
- Select a SharePoint site from a list, or provide the relative site path (URL).
- Select a document library from the chosen site (we list all available libraries).
- 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
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 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