I was trying to filter emails based on their attachments. So i am filtering based on the attachment name to be more precise. Filtering with AQS ("attachments: picture.jpg") works fine and i get the right results. But when i use SearchFilters i get no results. I am using the following command:
var filter = new SearchFilter.ContainsSubstring(EmailMessageSchema.Attachments, "picture.jpg");
I even used the explicit filter parameters but still get no results.
var filter = new SearchFilter.ContainsSubstring(EmailMessageSchema.Attachments,"picture.jpg", ContainmentMode.Substring, ComparisonMode.IgnoreCase);
I use Exchange Server 2016/2019.