Microsoft Graph - Filter Messages by Categories

Paulus Dettmer 25 Reputation points
2023-11-07T08:26:55.1933333+00:00

Hello,

after searching for how to filter messages by categories with the MS Graph I stumbled upon this thread already answering half of my question:

$filter=categories/any(a:a eq 'Orange Category') OR categories/any(b:b eq 'Red Category')

finds all messages that contain either red or orange (or both) category.

Now I want to filter for all messages containing the red AND the orange category. But while the upper query returns all expected results, the query with AND

$filter=categories/any(a:a eq 'Orange Category') AND categories/any(b:b eq 'Red Category')

does not yield any results, even tho the upper query returns results that have both, orange and red, category.

Is there something i can do about that?

Thank you very much in advance

Microsoft Security | Microsoft Graph
0 comments No comments
{count} vote

Accepted answer
  1. Vasil Michev 119.6K Reputation points MVP Volunteer Moderator
    2023-11-07T16:45:07.2166667+00:00

    Seems to work fine here:

    User's image

    Though I did found one GitHub issue complaining that it's not working: https://github.com/microsoftgraph/microsoft-graph-docs-contrib/issues/8517

    0 comments No comments

0 additional answers

Sort by: Most helpful

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.