IGraphClientAsync.ListMessagesAsync

ListMessagesAsync(string, ODataQueryBuilder, CancellationToken)

Asynchronously lists MessageInfo from the parent folder.

public Task<MessageInfoCollection> ListMessagesAsync(string id, 
    ODataQueryBuilder queryBuilder = null, CancellationToken cancellationToken = default)
ParameterTypeDescription
idStringParent folder id.
queryBuilderODataQueryBuilderOptional OData query builder for filtering messages.
cancellationTokenCancellationTokenA cancellation token to observe while waiting for the task to complete.

Return Value

A task that represents the asynchronous operation. The task result contains the list of MessageInfo of the folder.

See Also


ListMessagesAsync(string, PageInfo, MailQuery, CancellationToken)

Asynchronously lists MessageInfo from the parent folder with paging and query.

public Task<GraphMessagePageInfo> ListMessagesAsync(string id, PageInfo page, MailQuery query, 
    CancellationToken cancellationToken = default)
ParameterTypeDescription
idStringParent folder id.
pagePageInfoA page info.
queryMailQueryMailQuery that represents search query.
cancellationTokenCancellationTokenA cancellation token to observe while waiting for the task to complete.

Return Value

A task that represents the asynchronous operation. The task result contains the list of MessageInfo of the folder.

See Also