microsoftgraph / microsoftgraph/msgraph-sdk-java

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

Aperta
#2,346 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

status:waiting-for-triage type:bug
Lingua principale
Java
Stelle
444
Fork
154
Merge medio
18h 28m
PR unite (30g)
4

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia riproducendo le richieste /v1.0/sites in Graph Explorer e con la versione 6.33.0 dell'SDK, confrontando le credenziali e la query di ricerca serializzata. Verifica se la discrepanza si trova nella richiesta del Java SDK o nel comportamento di Graph API; il lavoro è completato quando sono stati stabiliti il componente responsabile e un comportamento coerente o una limitazione documentata.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
api
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.