IGraphClientAsync.CreateAttachmentAsync

IGraphClientAsync.CreateAttachmentAsync method

Asynchronously creates an attachment in the specified parent item.

public Task<MapiAttachment> CreateAttachmentAsync(string parentId, MapiAttachment attachment, 
    CancellationToken cancellationToken = default)
ParameterTypeDescription
parentIdStringThe ID of the parent item (message, event, etc.).
attachmentMapiAttachmentThe MapiAttachment to create.
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 created MapiAttachment.

See Also