Malformed JSON response to Graph API /me/messages endpoint

Partners Zapier 15 Reputation points
2026-01-03T01:02:19.8433333+00:00

We have recently started seeing responses from the Graph API endpoint that have malformed JSON in the response. It ends with "value":[ and then no content beyond that. The status code is 200.

This does not happen with all requests, only some of them.

We saw a small percentage of these responses starting on Dec 22, but it greatly increased on Dec 30 and has continued at that level until now.

The number of daily requests we make to this endpoint is in the millions.

Endpoint

/v1.0/me/messages

Example Response Content

{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#users('12345678-abcd-abcd-abcd-12345678abcd')/messages(id,createdDateTime,lastModifiedDateTime,changeKey,categories,receivedDateTime,sentDateTime,hasAttachments,internetMessageId,subject,bodyPreview,importance,parentFolderId,conversationId,conversationIndex,isDeliveryReceiptRequested,isReadReceiptRequested,isRead,isDraft,webLink,inferenceClassification,sender,from,toRecipients,ccRecipients,bccRecipients,replyTo,flag,attachments(id,name,size,lastModifiedDateTime,isInline,contentType))","value":[

Microsoft 365 and Office | Development | Other
{count} vote

2 answers

Sort by: Most helpful
  1. Partners Zapier 15 Reputation points
    2026-01-05T21:47:12.9766667+00:00

    Thank you for the suggestions — we’ve investigated these areas further and wanted to share additional observations that may help narrow this down.

    Based on what we’re seeing, the issue does not appear to be driven by overall response size, page size, or pagination:

    • We see successful responses with $top=1000 when using $filter + $orderby (without $search).
    • We see failures with much smaller $top values when $search is included.

    This suggests the behavior may be correlated with the presence of $search, rather than general payload size or pagination limits.

    In the failing cases, requests return 200 OK with headers indicating a streamed response (transfer- encoding: chunked and odata.streaming=true), but the response body terminates early:

    {
      "@odata.context": "...",
      "value": [
    

    No message objects or error details follow. From the client’s perspective, the response appears successful at the HTTP level but incomplete at the payload level.

    Additional context:

    • We use a defined $select and $expand=attachments as part of our integration’s expected response shape; removing these would be a breaking change for existing usage.
    • Client-side retries do not resolve the behavior for affected tenants.
    2 people found this answer helpful.

  2. Jack-Bu 5,825 Reputation points Microsoft External Staff Moderator
    2026-01-03T12:27:10.66+00:00

    Hello Partners Zapier

    Thank you for reaching out to Microsoft Q&A regarding the intermittent malformed JSON responses from the Graph API /me/messages endpoint. I've reviewed the details you provided, similar problems have been reported, often tied to large result sets, specific $select parameters, pagination handling, or internal service limits. While I couldn't find evidence of a widespread outage matching your exact timeline, here are some steps to help mitigate the issue:

    • Adjust query parameters to reduce response size: If your query includes a comprehensive $select clause, which may contribute to larger responses and potential truncation. Try minimizing the selected fields (like start with $select=id,subject,receivedDateTime) and add them back gradually to identify any triggers. Additionally, enforce pagination with smaller page sizes like $top=5 or $top=10, and handle the @odata.nextLink for subsequent pages. Narrowing filters, such as by date range or folder, can also help reduce result sets and avoid thresholds.
    • Test client-side retries and validation: To handle these intermittent issues, add logic to detect malformed JSON (e.g., check for proper closing braces during parsing) and automatically retry the request 1-3 times with exponential backoff. If you're not already using it, consider the Microsoft Graph SDK for your platform, as it provides built-in support for retries, pagination, and error handling, which can make your implementation more robust.
    • Try out different ways to query: For efficient bulk or ongoing fetches, consider switching to delta queries (/me/mailFolders/inbox/messages/delta) to track changes without full list retrievals, which is ideal for high-volume scenarios like yours. If the issue seems tied to specific users or mailboxes, test across a sample to isolate patterns.

    If these steps don't fully resolve the problem, please provide additional details such as sample query parameters, client stack, or headers from affected responses in the comment bellow, I'm here to assist.


    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.