microsoftgraph / microsoftgraph/msgraph-sdk-java

Site `search` query parameter is inconsistent between SDK and Graph Explorer

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

還沒有人認領這個 Issue。

status:waiting-for-triage type:bug
主要語言
Java
星號
444
分支
154
平均合併
18 小時 28 分鐘
30 天內合併 PR
4

描述

Describe the bug

When using Graph Explorer, the API endpoint https://graph.microsoft.com/v1.0/sites returns nothing.

With Graph Explorer, it appears that using ?search=* works to return all sites.

When using the SDK, the same endpoint returns sites, and specifying queryParameters.search = "*" throws:

Syntax error: character '*' is not valid at position 0 in '*'.
com.microsoft.graph.models.odataerrors.ODataError: Syntax error: character '*' is not valid at position 0 in '*'.

based on the response:

{
  "error": {
    "code": "BadRequest",
    "message": "Syntax error: character '*' is not valid at position 0 in '*'.",
    "innerError": {
      "date": "2025-03-31T18:56:12",
      "request-id": "f29db1f9-b0d7-4d4b-a724-7599a932bcca",
      "client-request-id": "fb1f170c-a4c0-4eb6-bb8c-852e3d3c7762"
    }
  }
}

These inconsistencies (along with issues like #2344 and #2345 ) make it very difficult to sanely develop applications using the MS Graph SDK.

One difference is that I am using client cert / secret credentials for the SDK and personal credentials for Explorer. That should not affect the API's functional behavior though.

Expected behavior

APIs should have consistent behavior.

How to reproduce

See above.

SDK Version

6.33.0

Latest version known to work for scenario above?

No response

Known Workarounds

Pull out hair, write code with many "argh" comments, and proceed

Debug output

No response

Configuration

No response

Other information

No response

貢獻指南

開啟貢獻指南

從這裡開始

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

研究方向

先在 Graph Explorer 中以及使用 SDK 版本 6.33.0 重現 /v1.0/sites 請求,同時比較認證資料和序列化後的搜尋查詢。追蹤差異是在 Java SDK 請求中,還是在 Graph API 的行為中;當確定負責的元件,並確立一致的行為或已記錄的限制時,即表示完成。

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

評估

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

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

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