Reputation: 211
I have investigated that if I use a search filter as follows:
string filter = String.Format("\"subject:\"");
List<QueryOption> options = new List<QueryOption>
{
new QueryOption("$search", filter)
};
var messages = graphClient.Me
.MailFolders
.Inbox
.Messages
.Request(options)
.Top(500)
.Select("id, Categories, Subject")
.GetAsync()
.Result;
Despite me using Top(500)
, the results cut off at 275
, I think there is a page limit associated with the search filter, does anyone know how to workaround this in the SDK?
If I do not include options in the messages query i.e. if I do Request()
, I get all messages.
Note that the Messages.NextPageProperty
also seems to return null so I cannot use this.
Upvotes: 0
Views: 638
Reputation: 33094
This is how the $search
parameter works. From the documentation:
Note: You can currently search only
message
andperson
collections. A$search
request returns up to250
results. You cannot use$filter
or$orderby
in a search request.
Upvotes: 2