ODBC guide

Read messages that have attachments


Gets only messages that have attachments. Use SearchCriteria='hasAttachments eq true' in the WITH clause.

SELECT * FROM get_messages
WITH (UserID='firstname.lastname@domainname.com', SearchCriteria='hasAttachments eq true')

--Check this link to learn more about search conditions: https://learn.microsoft.com/en-us/graph/filter-query-parameter?tabs=http