The user object has email addresses stored in a couple of properties: the mail and otherMails properties. Both of these properties can be used to search for certain users having the desired email addresses. Here is an example of how to use the filter query to search for user using mail property:
GET https://graph.microsoft.com/beta/users?$filter=mail eq ‘firstname.lastname@example.org’
GET https://graph.microsoft.com/v1.0/users?$filter=mail eq ‘email@example.com’
Unlike the mail attribute (string-type property), the otherMails attribute is a Collection of strings so we need to use the Any() function to do any searching on this property. Below are a couple of examples using the v1.0 endpoint:
GET https://graph.microsoft.com/v1.0/users?$filter=otherMails/any(x:x eq ‘firstname.lastname@example.org’)
GET https://graph.microsoft.com/v1.0/users?$filter=otherMails/any(x:startswith(x, ‘xxx’))
Note: not every user object property supports filter query. Check the documentation for the resource to see which property is “filterable”.
In the example below from the User object, the licenseAssignmentStates property does not support filter while the mail property does