Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use the 'in' operator for $filter on Microsoft Graph Mail API?

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.

like image 906
shinkhouse Avatar asked Oct 12 '20 17:10

shinkhouse


1 Answers

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
like image 163
Bolesław Denk Avatar answered Sep 22 '22 07:09

Bolesław Denk