microsoftgraph / microsoftgraph/msgraph-sdk-java
Site `search` query parameter is inconsistent between SDK and Graph Explorer
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 444
- Forks
- 154
- Avg merge
- 18h 28m
- Merged PRs (30d)
- 4
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the /v1.0/sites requests in Graph Explorer and with SDK version 6.33.0, comparing the credentials and serialized search query. Trace whether the discrepancy is in the Java SDK request or the Graph API behavior; done means the responsible component and a consistent behavior or documented limitation are established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100