Filtering messages with categories that start with a string

Copper Contributor

I'm trying to $filter all messages that have categories that start with a specific string.

 

So

https://graph.microsoft.com/v1.0/me/messages?$filter=categories/any(a:a eq 'test-') 

works

but

https://graph.microsoft.com/v1.0/me/messages?$filter=categories/any(a:startsWith(a,'test-'))

 does not - I get the "The query filter contains one or more invalid nodes." error.

 

{
    "error": {
        "code": "ErrorInvalidUrlQueryFilter",
        "message": "The query filter contains one or more invalid nodes."
    }
}

 

What should be the proper syntax for this Graph query?

0 Replies