microsoftgraph / microsoftgraph/microsoft-graph-explorer-v4
Graph API Pagination Fails with 502 Bad Gateway When Using @odata.nextLink on Channel Messages
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 260
- Forks
- 110
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
When calling the Microsoft Graph API to retrieve channel messages with pagination, the first page returns successfully. However, when using the @odata.nextLink value to retrieve the next page, the request fails with a Bad Gateway error.
To Reproduce
Steps to reproduce the behavior:
Steps to reproduce the behavior:
Call the following API to retrieve channel messages (first page works):
GET /beta/teams/{team-id}/channels/{channel-id}/messages?$expand=replies&$top=50
Extract the @odata.nextLink value from the response.
Call the @odata.nextLink URL.
Observe the error response:
{ "error": { "code": "UnknownError", "message": "Bad Gateway", "innerError": { "date": "<timestamp>", "request-id": "<request-id>", "client-request-id": "<client-request-id>" } } }
Expected behavior
The @odata.nextLink request should return the next page of messages successfully, consistent with standard Graph API pagination behavior.
Screenshots
Not applicable (API-based issue).
Desktop (please complete the following information):
OS: N/A (API call)
Client: Custom HTTP client / backend service
Version: N/A
Smartphone (please complete the following information):
Device: N/A
OS: N/A
Browser: N/A
Version: N/A
Additional context
Issue occurs specifically when using:
Pagination via @odata.nextLink
The first page consistently works, indicating:
Authentication is valid
Endpoint is correct
The failure only occurs on subsequent page retrievals.
This behavior suggests a potential issue with:
Backend pagination handling
Query parameter propagation in nextLink
Service instability or gateway issue
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 beta channel-messages request with $expand=replies and $top=50, then follow the returned @odata.nextLink. The issue names no repository file, test, or entry point, so inspect how this Graph Explorer handles paginated API responses. Done means the next-page request returns messages instead of a 502 Bad Gateway error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100