graphapi filter

abhishek appu 21 Reputation points
2022-12-08T07:22:16.353+00:00

268480-sender-filter.png

here the sender filter is not working(******@vidyatech.in), the subject and unread mail filter is working ,the code is use for read the unreadmail using graphapi

Microsoft Security | Microsoft Entra | Microsoft Entra ID
Microsoft Security | Microsoft Graph
0 comments No comments

2 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Gopinath Chennamadhavuni 2,446 Reputation points
    2022-12-08T10:40:40.417+00:00

    Hi @abhishek appu ,

    Thanks for reaching out.

    I am unable to reproduce the issue. I am getting the desired results as per the filter applied in the graph API.
    Please refer the below screen shot.
    268621-message.png

    Use the below code to get the expected mail details.

    GraphServiceClient graphClient = new GraphServiceClient( authProvider );  
         var messages = await graphClient.Users[Gopi_ADM@m******.onmicrosoft.com].MailFolders["Inbox"].Messages  
             .Request()  
             .Filter("isRead eq false and from/emailAddress/address eq 'Gopi_adm@*******.OnMicrosoft.com' and subject eq 'Your Test booking calendar has been created'")  
             .GetAsync();  
    

    I would request you to please verify the above details from your end and if issue still persists, I would recommend you to raise a support case with Microsoft Graph, a Support Engineer will be able to assist you better. You can raise support ticket from http://aad.portal.azure.com/ or https://admin.microsoft.com/#/support/requests.

    Hope this helps.

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

    Was this answer helpful?

    0 comments No comments

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.