Forum Discussion

ofc_edu_pl's avatar
ofc_edu_pl
Copper Contributor
Apr 16, 2024

Filtering messages with categories that start with a string

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?

No RepliesBe the first to reply

Resources