microsoftgraph / microsoftgraph/msgraph-sdk-java
Fetching allMembers fails for public and private channels
まだ誰も着手していません。
- 主要言語
- Java
- スター
- 444
- フォーク
- 154
- 平均マージ
- 18時間 28分
- マージ済み PR(30日)
- 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 にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Issue にある Java 再現から始めて AllMembersRequestBuilder.get を調べ、生成された allMembers と members のリクエストパスを、パブリック、プライベート、共有チャンネルについて比較します。ドキュメント化された allMembers エンドポイントに照らして動作を確認し、不一致が SDK のリクエストにあるのかサービスにあるのかを特定します。完了条件は、問題のあるチャンネルタイプが一貫して処理されるか、問題が明確にサービス側として特定されることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- api
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100