Filter outlook email by "mentions me" and "Size"

Dipika Das 141 Reputation points
2023-04-28T04:50:57.7266667+00:00

Hi, I want to add a filter to make available search by "mentions me" and sort by "size" same as below image. I tried to use the below filter value.

i.e. $filter = mentionsPreview/isMentioned eq true. But this is only working in beta version. Please let me know how i can achieve this in v1.0. Same for size sort by.

outlookfilter

Please if anyone has answer of my queries let me know it would very helpful for me.

Thanks in advance.

Outlook
Outlook
A family of Microsoft email and calendar products.
2,178 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
9,089 questions
0 comments No comments
{count} votes

Accepted answer
  1. CarlZhao-MSFT 31,816 Reputation points
    2023-04-28T08:32:46.4766667+00:00

    Hi @Dipika Das

    According to my tests, the mentionsPreview property is not yet available in V1.0, it only works in beta.

    Also, I can't seem to sort mail messages by size, because I can't find the size property in the property set.

    Refer to the sample snippet:

    var result = await graphClient.Me.Messages.GetAsync((requestConfiguration) =>
    {
        requestConfiguration.QueryParameters.Filter = "mentionsPreview/isMentioned eq true";
        requestConfiguration.Headers.Add("Prefer", "outlook.body-content-type=\"text\"");
    });
    
    

    Debugging:
    User's image

    Hope this helps.

    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 additional answers

Sort by: Most helpful