microsoftgraph / microsoftgraph/msgraph-sdk-java
Fetching allMembers fails for public and private channels
还没有人认领这个 Issue。
- 主要语言
- Java
- 星标
- 444
- 派生
- 154
- 平均合并
- 18 小时 28 分钟
- 30 天内合并 PR
- 4
描述
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
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 issue 中的 Java 复现开始,检查 AllMembersRequestBuilder.get,然后比较针对 public、private 和 shared channels 生成的 allMembers 和 members 请求路径。根据文档化的 allMembers endpoint 确认其行为,并确定差异出在 SDK request 还是 service;完成的标准是失败的 channel 类型得到一致处理,或明确确定问题出在 service 端。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- api
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100