microsoftgraph / microsoftgraph/msgraph-sdk-java

Fetching allMembers fails for public and private channels

未關閉
#2,438 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

status:waiting-for-triage type:bug
主要語言
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

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

從 issue 中的 Java 重現開始,檢查 AllMembersRequestBuilder.get,接著比較針對 public、private 和 shared channels 產生的 allMembers 與 members request 路徑。根據文件化的 allMembers endpoint 確認其行為,並判定差異是在 SDK request 還是 service;完成的標準是失敗的 channel 類型得到一致處理,或明確確認問題出在 service 端。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
java
領域
api
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。