microsoftgraph / microsoftgraph/msgraph-sdk-java
Fetching allMembers fails for public and private channels
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ả
Describe the bug
According to the documentation the allMembers endpoint can be used for any channel type. This can be confirmed using the Graph Explorer or manualy invoking that endpoint.
However, when using the SDK to fetch all members for any channel that is not shared the request fails.
com.microsoft.graph.models.odataerrors.ODataError: Failed to execute GetThreadRosterAsync.
at com.microsoft.graph.models.odataerrors.ODataError.createFromDiscriminatorValue(ODataError.java:36)
at com.microsoft.kiota.serialization.JsonParseNode.getObjectValue(JsonParseNode.java:212)
at com.microsoft.kiota.http.OkHttpRequestAdapter.lambda$throwIfFailedResponse$0(OkHttpRequestAdapter.java:706)
at com.microsoft.kiota.ApiExceptionBuilder.<init>(ApiExceptionBuilder.java:26)
at com.microsoft.kiota.http.OkHttpRequestAdapter.throwIfFailedResponse(OkHttpRequestAdapter.java:705)
at com.microsoft.kiota.http.OkHttpRequestAdapter.send(OkHttpRequestAdapter.java:307)
at com.microsoft.graph.teams.item.channels.item.allmembers.AllMembersRequestBuilder.get(AllMembersRequestBuilder.java:102)
at com.microsoft.graph.teams.item.channels.item.allmembers.AllMembersRequestBuilder.get(AllMembersRequestBuilder.java:88)
...
Expected behavior
The request should work for any channel type (as it does when using the members() endpoint insted of allMembers().
How to reproduce
graphClient.teams()
.byTeamId(team.getId())
.channels()
.byChannelId(channel.getId()) //use a private or public channel here
.allMembers()
.get(); //the error occurs at this point unless the provided channel has MembershipType.Shared
SDK Version
6.45.0
Latest version known to work for scenario above?
No response
Known Workarounds
Check the Channel.getMembershipType() and fallback to members() if the channel is not shared
Debug output
No response
Configuration
No response
Other information
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 với bản tái hiện bằng Java trong issue và kiểm tra AllMembersRequestBuilder.get, sau đó so sánh các đường dẫn request allMembers và members được tạo ra cho các channel public, private và shared. Xác nhận hành vi dựa trên endpoint allMembers đã được dokumentiert và xác định liệu sự khác biệt nằm ở request của SDK hay ở service; hoàn tất có nghĩa là các loại channel bị lỗi được xử lý nhất quán hoặc vấn đề được xác định rõ ràng là do phía service.
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
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- 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
- 35/100