ExchangeService.SetRetentionPolicyForItemsInConversations method

Sets the retention policy for items in conversation.

The SetRetentionPolicyForItemsInConversations(IEnumerable<KeyValuePair<ConversationId, Nullable<DateTime>>>, FolderId, RetentionType, Nullable<Guid>) method is applicable for clients that target Exchange Online and versions of Exchange starting with Exchange Server 2013.

Namespace:  Microsoft.Exchange.WebServices.Data
Assembly:  Microsoft.Exchange.WebServices (in Microsoft.Exchange.WebServices.dll)

Public Function SetRetentionPolicyForItemsInConversations ( _
	idLastSyncTimePairs As IEnumerable(Of KeyValuePair(Of ConversationId, Nullable(Of DateTime))), _
	contextFolderId As FolderId, _
	retentionPolicyType As RetentionType, _
	retentionPolicyTagId As Nullable(Of Guid) _
) As ServiceResponseCollection(Of ServiceResponse)
Dim instance As ExchangeService
Dim idLastSyncTimePairs As IEnumerable(Of KeyValuePair(Of ConversationId, Nullable(Of DateTime)))
Dim contextFolderId As FolderId
Dim retentionPolicyType As RetentionType
Dim retentionPolicyTagId As Nullable(Of Guid)
Dim returnValue As ServiceResponseCollection(Of ServiceResponse)

returnValue = instance.SetRetentionPolicyForItemsInConversations(idLastSyncTimePairs, _
	contextFolderId, retentionPolicyType, _


Type: System.Collections.Generic.IEnumerable<KeyValuePair<ConversationId, Nullable<DateTime>>>

A collection of conversation IDs and an associated time stamp used to determine which conversations need to be updated.

Type: Microsoft.Exchange.WebServices.Data.FolderId

The ID of the folder that contains the conversation.

Type: Microsoft.Exchange.WebServices.Data.RetentionType

The tagged item is either archived or deleted.

Type: System.Nullable<Guid>

The retention policy tag ID. Setting the reference to a null reference (Nothing in Visual Basic) clears the policy.

Return value

Type: Microsoft.Exchange.WebServices.Data.ServiceResponseCollection<ServiceResponse>
The results of the applied retention policy change.

Calling this method results in a call to Exchange Web Services (EWS) Managed API.