MS Graph can't find mail in sent folder

Graeme Tacon 1 Reputation point
2024-07-18T08:12:01.5466667+00:00

Hi,
Through an automated process, we are sending emails using MS Graph. The subject of each email is unique.

Further down the process, we try to search for the email in the folder, using the $filter command.

99% of the time, this is working perfectly, but occasionally, it says it can't find the mail.

We can see in the mailbox that the email is there, but MS Graph doesn't find it.

If we manually moved the mail to another folder within the mailbox and then back to the sent folder, then MS Graph does find it!

Is anyone else experiencing this or know why it is happening and have a solution ?

Thanks

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,115 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rohit Raghuwanshi - MSFT 475 Reputation points Microsoft Vendor
    2024-08-15T14:52:45.6866667+00:00

    Hello Graeme Tacon,

    Thank you for reaching out, Microsoft.

    I attempted to replicate the scenario and successfully retrieved the email using $filter on each occasion. Please see the screenshot below:

    1. Post request to send emailUser's image
    2. A GET request to retrieve emails from the Sent Items folder, filtered by subject.
      User's image

    Please refer to the document below:
    https://learn.microsoft.com/en-us/graph/api/user-sendmail?view=graph-rest-1.0&tabs=http

    https://learn.microsoft.com/en-us/graph/api/mailfolder-list-messages?view=graph-rest-1.0&tabs=http

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

    0 comments No comments

Your answer

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