Microsoft Graph API for Email Attachment can't filter by Size

Viewed 67

I'm using the API documented here https://docs.microsoft.com/en-us/graph/api/message-list-attachments?view=graph-rest-1.0&tabs=http

I'm also using a couple of https://docs.microsoft.com/en-us/graph/query-parameters, including $select, which works fine and $filter, which does not

I'm looking to filter Attachments by size, like this

...URL...?$select=field1,field2,field3&$filter=size ge 1000

But it seems to be ignored; I was testing this in Graph Explorer; I'm aware you can't have spaces in a URL, I used %20 instead, spaces used above for clarity

I tried one or two other filter parameters, which were OK; am I missing something simple?

1 Answers

It's known issue that attachments endpoint does not support filters.

The $filter parameter is ignored.

Workaround is to filter attachments by size on the client.

Resources:

Known issues

Related