You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IMessageDeltaCollectionPage messageDeltaCollectionPage = await graphServiceClient .Me.MailFolders[folderId] .Messages.Delta() .Request(new List<Option> { new QueryOption("$select", "LastModifiedDateTime"), new QueryOption("changeType", "created"), new HeaderOption("Prefer", $"odata.maxpagesize={MaxPageSize.ToString()}") }) .Filter($"receivedDateTime ge {syncAfter:s}Z") .GetAsync();
but in 5.x graphServiceClient.Me.MailFolders[folderId].Messages.Delta.GetAsDeltaGetResponseAsync( configuration => { configuration.QueryParameters.Select = new[] { "LastModifiedDateTime" }; configuration.QueryParameters.Filter = $"receivedDateTime ge {syncAfter:s}Z"; configuration.Headers.Add("Prefer", $"odata.maxpagesize={MaxPageSize.ToString()}"); });
there's no place to specify the changetype like this configuration.QueryParameters.ChangeType = new[] { "created", };
The text was updated successfully, but these errors were encountered:
Update: the fix to metadata was just merged in today, which means the query parameter should show up in the next generation next week. microsoftgraph/msgraph-metadata#500
In 4.x we can write code like this.
IMessageDeltaCollectionPage messageDeltaCollectionPage = await graphServiceClient .Me.MailFolders[folderId] .Messages.Delta() .Request(new List<Option> { new QueryOption("$select", "LastModifiedDateTime"), new QueryOption("changeType", "created"), new HeaderOption("Prefer", $"odata.maxpagesize={MaxPageSize.ToString()}") }) .Filter($"receivedDateTime ge {syncAfter:s}Z") .GetAsync();
but in 5.x
graphServiceClient.Me.MailFolders[folderId].Messages.Delta.GetAsDeltaGetResponseAsync( configuration => { configuration.QueryParameters.Select = new[] { "LastModifiedDateTime" }; configuration.QueryParameters.Filter = $"receivedDateTime ge {syncAfter:s}Z"; configuration.Headers.Add("Prefer", $"odata.maxpagesize={MaxPageSize.ToString()}"); });
there's no place to specify the changetype like this
configuration.QueryParameters.ChangeType = new[] { "created", };
The text was updated successfully, but these errors were encountered: