microsoftgraph / microsoftgraph/msgraph-sdk-java
Retrieve SharePoint Site ID from URL/Path Using Graph API Without Sites.Read.All Permission
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Java
- Star
- 444
- Fork
- 154
- Merge trung bình
- 18 giờ 28 phút
- Pull request đã merge (30 ngày)
- 4
Mô tả
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách xem xét các entry point của Microsoft Graph API Java SDK để liệt kê các site và truy xuất site ID theo tên, URL hoặc đường dẫn tương đối, cùng với hành vi của quyền Sites.Selected được mô tả ở đây. Công việc được xem là hoàn tất khi xác định được liệu các thao tác này có thể được hỗ trợ mà không cần Sites.Read.All hay không và, nếu có, xác định hành vi API được yêu cầu và xác thực hành vi đó bằng phạm vi kiểm thử SDK phù hợp.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java
- Lĩnh vực
- api, authorization
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 30/100