Graph Request on email messages fails with "ErrorItemPropertyRequestedFailed"

sriram s 0 Reputation points
2024-08-13T06:32:08.0833333+00:00

Recently faced a issue in Graph API while requesting details of outlook email messages with error message 'ErrorItemPropertyRequestedFailed' which is said to occur if a property that may exist, but couldn't be retrieved (reference)

I selected all available props of a email message with query

https://graph.microsoft.com/v1.0/me/mailfolders/inbox/messages?$select=*"
enter image description here

To know the prop on which the request fails, I broke down the query by selecting specific props and found that uniqueBody is the one that couldn't be retrieved in graph request. while excluding this from the selected query it doesn't throw any error and including it in query does.
enter image description here

I need UniqeBody content for some use case and I cannot skip it in the request. I guess, the large uniqueBody content might be the reason that makes the retrieval process fail.

Is there anything that I could make like adding parameters to request headers that throttles this case (heavy Uniquebody content) or anything that could help me retrieving those details/just skip the message that face this error. It becomes difficult to get the other message details as no delta or next link is obtained in response while facing this error.

Thanks in advance.

Microsoft 365 and Office | Install, redeem, activate | For business | Windows
Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Hitesh Pachipulusu - MSFT 3,635 Reputation points Microsoft External Staff
    2024-08-13T13:08:45.8333333+00:00

    Hello sriram s,

    Thank you for contacting Microsoft Support!

    The maximum payload size for requests and responses in the Microsoft Graph API is typically limited to 4MB. This means that if the uniqueBody content of an email message exceeds this limit, it could cause the retrieval process to fail.

    To handle large uniqueBody content, you might consider using the following strategies:

    1. Pagination: Limit the number of messages returned in a single request using the $top query parameter.
    2. Batch Requests: Split the load across multiple smaller requests.
    3. Error Handling: Implement error handling to skip messages that cause the error and log them for separate processing.
    4. Delta Query: Use delta queries to track changes and reduce the amount of data processed.

    These strategies can help you manage and retrieve large uniqueBody content more effectively.

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.


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.