5
votes

I'm trying to use the microsoft graph mail api to query for a small amount of emails using the in operator but cannot find an example.

This is how I am trying to use it: https://graph.microsoft.com/v1.0/me/messages?$filter=(from/emailAddress/address) in '[email protected], [email protected]'

In their documentation, it says that you can use the in operator for $filter.

1
Instead of 'in', i used 'eq' and it works for me. You can try that out. graph.microsoft.com/v1.0/me/messages?$filter=from/emailAddress/… eq '[email protected]'Dev

1 Answers

3
votes

I am not opposing other answers, I am just leaving this snippet if anyone was looking for IN operator usage format:

$filter=displayName in ('group-1', 'group-2')

Full url example after encoding:

https://graph.microsoft.com/v1.0/groups?$filter=displayName%20in%20%28%27group-1%27%2C%20%27group-2%27%29