Table of Contents

Class ExchangeService

Namespace
Microsoft.Exchange.WebServices.Data
Assembly
Microsoft.Exchange.WebServices.dll

Represents a binding to the Exchange Web Services.

public sealed class ExchangeService : ExchangeServiceBase
Inheritance
ExchangeService
Inherited Members

Constructors

ExchangeService()

Initializes a new instance of the ExchangeService class, targeting the latest supported version of EWS and scoped to the system's current time zone.

public ExchangeService()

ExchangeService(ExchangeVersion)

Initializes a new instance of the ExchangeService class, targeting the specified version of EWS and scoped to the system's current time zone.

public ExchangeService(ExchangeVersion requestedServerVersion)

Parameters

requestedServerVersion ExchangeVersion

The version of EWS that the service targets.

ExchangeService(ExchangeVersion, TimeZoneInfo)

Initializes a new instance of the ExchangeService class, targeting the specified version of EWS and scoped to the specified time zone.

public ExchangeService(ExchangeVersion requestedServerVersion, TimeZoneInfo timeZone)

Parameters

requestedServerVersion ExchangeVersion

The version of EWS that the service targets.

timeZone TimeZoneInfo

The time zone to which the service is scoped.

ExchangeService(TimeZoneInfo)

Initializes a new instance of the ExchangeService class, targeting the latest supported version of EWS and scoped to the specified time zone.

public ExchangeService(TimeZoneInfo timeZone)

Parameters

timeZone TimeZoneInfo

The time zone to which the service is scoped.

Properties

DateTimePrecision

Gets or sets the DateTime precision for DateTime values returned from Exchange Web Services.

public DateTimePrecision DateTimePrecision { get; set; }

Property Value

DateTimePrecision

EnableScpLookup

Gets or sets a value indicating whether the AutodiscoverUrl method should perform SCP (Service Connection Point) record lookup when determining the Autodiscover service URL.

public bool EnableScpLookup { get; set; }

Property Value

bool

FileAttachmentContentHandler

Gets or sets a file attachment content handler.

public IFileAttachmentContentHandler FileAttachmentContentHandler { get; set; }

Property Value

IFileAttachmentContentHandler

ImpersonatedUserId

Gets or sets the Id of the user that EWS should impersonate.

public ImpersonatedUserId ImpersonatedUserId { get; set; }

Property Value

ImpersonatedUserId

ManagementRoles

public ManagementRoles ManagementRoles { get; set; }

Property Value

ManagementRoles

PreferredCulture

Gets or sets the preferred culture for messages returned by the Exchange Web Services.

public CultureInfo PreferredCulture { get; set; }

Property Value

CultureInfo

TimeZone

Gets the time zone this service is scoped to.

public TimeZoneInfo TimeZone { get; }

Property Value

TimeZoneInfo

TraceEnablePrettyPrinting

Gets or sets a value indicating whether trace output is pretty printed.

public bool TraceEnablePrettyPrinting { get; set; }

Property Value

bool

UnifiedMessaging

Provides access to the Unified Messaging functionalities.

public UnifiedMessaging UnifiedMessaging { get; }

Property Value

UnifiedMessaging

Url

Gets or sets the URL of the Exchange Web Services.

public Uri Url { get; set; }

Property Value

Uri

Methods

AddDelegates(Mailbox, MeetingRequestsDeliveryScope?, params DelegateUser[])

Adds delegates to a specific mailbox. Calling this method results in a call to EWS.

public Collection<DelegateUserResponse> AddDelegates(Mailbox mailbox, MeetingRequestsDeliveryScope? meetingRequestsDeliveryScope, params DelegateUser[] delegateUsers)

Parameters

mailbox Mailbox

The mailbox to add delegates to.

meetingRequestsDeliveryScope MeetingRequestsDeliveryScope?

Indicates how meeting requests should be sent to delegates.

delegateUsers DelegateUser[]

The delegate users to add.

Returns

Collection<DelegateUserResponse>

A collection of DelegateUserResponse objects providing the results of the operation.

AddDelegates(Mailbox, MeetingRequestsDeliveryScope?, IEnumerable<DelegateUser>)

Adds delegates to a specific mailbox. Calling this method results in a call to EWS.

public Collection<DelegateUserResponse> AddDelegates(Mailbox mailbox, MeetingRequestsDeliveryScope? meetingRequestsDeliveryScope, IEnumerable<DelegateUser> delegateUsers)

Parameters

mailbox Mailbox

The mailbox to add delegates to.

meetingRequestsDeliveryScope MeetingRequestsDeliveryScope?

Indicates how meeting requests should be sent to delegates.

delegateUsers IEnumerable<DelegateUser>

The delegate users to add.

Returns

Collection<DelegateUserResponse>

A collection of DelegateUserResponse objects providing the results of the operation.

ArchiveItems(IEnumerable<ItemId>, FolderId)

Archives multiple items in a single call to EWS.

public ServiceResponseCollection<ArchiveItemResponse> ArchiveItems(IEnumerable<ItemId> itemIds, FolderId sourceFolderId)

Parameters

itemIds IEnumerable<ItemId>

The Ids of the items to move.

sourceFolderId FolderId

The Id of the folder in primary corresponding to which items are being archived to.

Returns

ServiceResponseCollection<ArchiveItemResponse>

A ServiceResponseCollection providing copy results for each of the specified item Ids.

AutodiscoverUrl(string)

Initializes the Url property to the Exchange Web Services URL for the specified e-mail address by calling the Autodiscover service.

public void AutodiscoverUrl(string emailAddress)

Parameters

emailAddress string

The email address to use.

AutodiscoverUrl(string, AutodiscoverRedirectionUrlValidationCallback)

Initializes the Url property to the Exchange Web Services URL for the specified e-mail address by calling the Autodiscover service.

public void AutodiscoverUrl(string emailAddress, AutodiscoverRedirectionUrlValidationCallback validateRedirectionUrlCallback)

Parameters

emailAddress string

The email address to use.

validateRedirectionUrlCallback AutodiscoverRedirectionUrlValidationCallback

The callback used to validate redirection URL.

BeginGetNonIndexableItemDetails(AsyncCallback, object, GetNonIndexableItemDetailsParameters)

Asynchronous call to get non indexable item details

public IAsyncResult BeginGetNonIndexableItemDetails(AsyncCallback callback, object state, GetNonIndexableItemDetailsParameters parameters)

Parameters

callback AsyncCallback

callback

state object

state

parameters GetNonIndexableItemDetailsParameters

Get non indexable item details parameters

Returns

IAsyncResult

Async result

BeginGetNonIndexableItemStatistics(AsyncCallback, object, GetNonIndexableItemStatisticsParameters)

Asynchronous call to get non indexable item statistics

public IAsyncResult BeginGetNonIndexableItemStatistics(AsyncCallback callback, object state, GetNonIndexableItemStatisticsParameters parameters)

Parameters

callback AsyncCallback

callback

state object

state

parameters GetNonIndexableItemStatisticsParameters

Get non indexable item statistics parameters

Returns

IAsyncResult

Async result

BeginSearchMailboxes(AsyncCallback, object, SearchMailboxesParameters)

Asynchronous call to search mailboxes

public IAsyncResult BeginSearchMailboxes(AsyncCallback callback, object state, SearchMailboxesParameters searchParameters)

Parameters

callback AsyncCallback

callback

state object

state

searchParameters SearchMailboxesParameters

search parameters

Returns

IAsyncResult

Async result

BeginSubscribeToPullNotifications(AsyncCallback, object, IEnumerable<FolderId>, int, string, params EventType[])

Begins an asynchronous request to subscribes to pull notifications. Calling this method results in a call to EWS.

public IAsyncResult BeginSubscribeToPullNotifications(AsyncCallback callback, object state, IEnumerable<FolderId> folderIds, int timeout, string watermark, params EventType[] eventTypes)

Parameters

callback AsyncCallback

The AsyncCallback delegate.

state object

An object that contains state information for this request.

folderIds IEnumerable<FolderId>

The Ids of the folder to subscribe to.

timeout int

The timeout, in minutes, after which the subscription expires. Timeout must be between 1 and 1440.

watermark string

An optional watermark representing a previously opened subscription.

eventTypes EventType[]

The event types to subscribe to.

Returns

IAsyncResult

An IAsyncResult that references the asynchronous request.

BeginSubscribeToPullNotificationsOnAllFolders(AsyncCallback, object, int, string, params EventType[])

Begins an asynchronous request to subscribe to pull notifications on all folders in the authenticated user's mailbox. Calling this method results in a call to EWS.

public IAsyncResult BeginSubscribeToPullNotificationsOnAllFolders(AsyncCallback callback, object state, int timeout, string watermark, params EventType[] eventTypes)

Parameters

callback AsyncCallback

The AsyncCallback delegate.

state object

An object that contains state information for this request.

timeout int

The timeout, in minutes, after which the subscription expires. Timeout must be between 1 and 1440.

watermark string

An optional watermark representing a previously opened subscription.

eventTypes EventType[]

The event types to subscribe to.

Returns

IAsyncResult

An IAsyncResult that references the asynchronous request.

BeginSubscribeToPushNotifications(AsyncCallback, object, IEnumerable<FolderId>, Uri, int, string, params EventType[])

Begins an asynchronous request to subscribe to push notifications. Calling this method results in a call to EWS.

public IAsyncResult BeginSubscribeToPushNotifications(AsyncCallback callback, object state, IEnumerable<FolderId> folderIds, Uri url, int frequency, string watermark, params EventType[] eventTypes)

Parameters

callback AsyncCallback

The AsyncCallback delegate.

state object

An object that contains state information for this request.

folderIds IEnumerable<FolderId>

The Ids of the folder to subscribe to.

url Uri

The URL of the Web Service endpoint the Exchange server should push events to.

frequency int

The frequency, in minutes, at which the Exchange server should contact the Web Service endpoint. Frequency must be between 1 and 1440.

watermark string

An optional watermark representing a previously opened subscription.

eventTypes EventType[]

The event types to subscribe to.

Returns

IAsyncResult

An IAsyncResult that references the asynchronous request.

BeginSubscribeToPushNotifications(AsyncCallback, object, IEnumerable<FolderId>, Uri, int, string, string, params EventType[])

Begins an asynchronous request to subscribe to push notifications. Calling this method results in a call to EWS.

public IAsyncResult BeginSubscribeToPushNotifications(AsyncCallback callback, object state, IEnumerable<FolderId> folderIds, Uri url, int frequency, string watermark, string callerData, params EventType[] eventTypes)

Parameters

callback AsyncCallback

The AsyncCallback delegate.

state object

An object that contains state information for this request.

folderIds IEnumerable<FolderId>

The Ids of the folder to subscribe to.

url Uri

The URL of the Web Service endpoint the Exchange server should push events to.

frequency int

The frequency, in minutes, at which the Exchange server should contact the Web Service endpoint. Frequency must be between 1 and 1440.

watermark string

An optional watermark representing a previously opened subscription.

callerData string

Optional caller data that will be returned the call back.

eventTypes EventType[]

The event types to subscribe to.

Returns

IAsyncResult

An IAsyncResult that references the asynchronous request.

BeginSubscribeToPushNotificationsOnAllFolders(AsyncCallback, object, Uri, int, string, params EventType[])

Begins an asynchronous request to subscribe to push notifications on all folders in the authenticated user's mailbox. Calling this method results in a call to EWS.

public IAsyncResult BeginSubscribeToPushNotificationsOnAllFolders(AsyncCallback callback, object state, Uri url, int frequency, string watermark, params EventType[] eventTypes)

Parameters

callback AsyncCallback

The AsyncCallback delegate.

state object

An object that contains state information for this request.

url Uri
frequency int

The frequency, in minutes, at which the Exchange server should contact the Web Service endpoint. Frequency must be between 1 and 1440.

watermark string

An optional watermark representing a previously opened subscription.

eventTypes EventType[]

The event types to subscribe to.

Returns

IAsyncResult

An IAsyncResult that references the asynchronous request.

BeginSubscribeToPushNotificationsOnAllFolders(AsyncCallback, object, Uri, int, string, string, params EventType[])

Begins an asynchronous request to subscribe to push notifications on all folders in the authenticated user's mailbox. Calling this method results in a call to EWS.

public IAsyncResult BeginSubscribeToPushNotificationsOnAllFolders(AsyncCallback callback, object state, Uri url, int frequency, string watermark, string callerData, params EventType[] eventTypes)

Parameters

callback AsyncCallback

The AsyncCallback delegate.

state object

An object that contains state information for this request.

url Uri
frequency int

The frequency, in minutes, at which the Exchange server should contact the Web Service endpoint. Frequency must be between 1 and 1440.

watermark string

An optional watermark representing a previously opened subscription.

callerData string

Optional caller data that will be returned the call back.

eventTypes EventType[]

The event types to subscribe to.

Returns

IAsyncResult

An IAsyncResult that references the asynchronous request.

BeginSubscribeToStreamingNotifications(AsyncCallback, object, IEnumerable<FolderId>, params EventType[])

Begins an asynchronous request to subscribe to streaming notifications. Calling this method results in a call to EWS.

public IAsyncResult BeginSubscribeToStreamingNotifications(AsyncCallback callback, object state, IEnumerable<FolderId> folderIds, params EventType[] eventTypes)

Parameters

callback AsyncCallback

The AsyncCallback delegate.

state object

An object that contains state information for this request.

folderIds IEnumerable<FolderId>

The Ids of the folder to subscribe to.

eventTypes EventType[]

The event types to subscribe to.

Returns

IAsyncResult

An IAsyncResult that references the asynchronous request.

BeginSubscribeToStreamingNotificationsOnAllFolders(AsyncCallback, object, params EventType[])

Begins an asynchronous request to subscribe to streaming notifications on all folders in the authenticated user's mailbox. Calling this method results in a call to EWS.

public IAsyncResult BeginSubscribeToStreamingNotificationsOnAllFolders(AsyncCallback callback, object state, params EventType[] eventTypes)

Parameters

callback AsyncCallback

The AsyncCallback delegate.

state object

An object that contains state information for this request.

eventTypes EventType[]

Returns

IAsyncResult

An IAsyncResult that references the asynchronous request.

BeginSyncFolderHierarchy(AsyncCallback, object, FolderId, PropertySet, string)

Begins an asynchronous request to synchronize the sub-folders of a specific folder. Calling this method results in a call to EWS.

public IAsyncResult BeginSyncFolderHierarchy(AsyncCallback callback, object state, FolderId syncFolderId, PropertySet propertySet, string syncState)

Parameters

callback AsyncCallback

The AsyncCallback delegate.

state object

An object that contains state information for this request.

syncFolderId FolderId

The Id of the folder containing the items to synchronize with. A null value indicates the root folder of the mailbox.

propertySet PropertySet

The set of properties to retrieve for synchronized items.

syncState string

The optional sync state representing the point in time when to start the synchronization.

Returns

IAsyncResult

An IAsyncResult that references the asynchronous request.

BeginSyncFolderHierarchy(AsyncCallback, object, PropertySet, string)

Begins an asynchronous request to synchronize the entire folder hierarchy of the mailbox this Service is connected to. Calling this method results in a call to EWS.

public IAsyncResult BeginSyncFolderHierarchy(AsyncCallback callback, object state, PropertySet propertySet, string syncState)

Parameters

callback AsyncCallback

The AsyncCallback delegate.

state object

An object that contains state information for this request.

propertySet PropertySet

The set of properties to retrieve for synchronized items.

syncState string

The optional sync state representing the point in time when to start the synchronization.

Returns

IAsyncResult

An IAsyncResult that references the asynchronous request.

BeginSyncFolderItems(AsyncCallback, object, FolderId, PropertySet, IEnumerable<ItemId>, int, SyncFolderItemsScope, string)

Begins an asynchronous request to synchronize the items of a specific folder. Calling this method results in a call to EWS.

public IAsyncResult BeginSyncFolderItems(AsyncCallback callback, object state, FolderId syncFolderId, PropertySet propertySet, IEnumerable<ItemId> ignoredItemIds, int maxChangesReturned, SyncFolderItemsScope syncScope, string syncState)

Parameters

callback AsyncCallback

The AsyncCallback delegate.

state object

An object that contains state information for this request.

syncFolderId FolderId

The Id of the folder containing the items to synchronize with.

propertySet PropertySet

The set of properties to retrieve for synchronized items.

ignoredItemIds IEnumerable<ItemId>

The optional list of item Ids that should be ignored.

maxChangesReturned int

The maximum number of changes that should be returned.

syncScope SyncFolderItemsScope

The sync scope identifying items to include in the ChangeCollection.

syncState string

The optional sync state representing the point in time when to start the synchronization.

Returns

IAsyncResult

An IAsyncResult that references the asynchronous request.

BindToItems(IEnumerable<ItemId>, PropertySet)

Binds to multiple items in a single call to EWS.

public ServiceResponseCollection<GetItemResponse> BindToItems(IEnumerable<ItemId> itemIds, PropertySet propertySet)

Parameters

itemIds IEnumerable<ItemId>

The Ids of the items to bind to.

propertySet PropertySet

The set of properties to load.

Returns

ServiceResponseCollection<GetItemResponse>

A ServiceResponseCollection providing results for each of the specified item Ids.

ConvertId(AlternateIdBase, IdFormat)

Converts Id from one format to another in a single call to EWS.

public AlternateIdBase ConvertId(AlternateIdBase id, IdFormat destinationFormat)

Parameters

id AlternateIdBase

The Id to convert.

destinationFormat IdFormat

The destination format.

Returns

AlternateIdBase

The converted Id.

ConvertIds(IEnumerable<AlternateIdBase>, IdFormat)

Converts multiple Ids from one format to another in a single call to EWS.

public ServiceResponseCollection<ConvertIdResponse> ConvertIds(IEnumerable<AlternateIdBase> ids, IdFormat destinationFormat)

Parameters

ids IEnumerable<AlternateIdBase>

The Ids to convert.

destinationFormat IdFormat

The destination format.

Returns

ServiceResponseCollection<ConvertIdResponse>

A ServiceResponseCollection providing conversion results for each specified Ids.

CopyItems(IEnumerable<ItemId>, FolderId)

Copies multiple items in a single call to EWS.

public ServiceResponseCollection<MoveCopyItemResponse> CopyItems(IEnumerable<ItemId> itemIds, FolderId destinationFolderId)

Parameters

itemIds IEnumerable<ItemId>

The Ids of the items to copy.

destinationFolderId FolderId

The Id of the folder to copy the items to.

Returns

ServiceResponseCollection<MoveCopyItemResponse>

A ServiceResponseCollection providing copy results for each of the specified item Ids.

CopyItems(IEnumerable<ItemId>, FolderId, bool)

Copies multiple items in a single call to EWS.

public ServiceResponseCollection<MoveCopyItemResponse> CopyItems(IEnumerable<ItemId> itemIds, FolderId destinationFolderId, bool returnNewItemIds)

Parameters

itemIds IEnumerable<ItemId>

The Ids of the items to copy.

destinationFolderId FolderId

The Id of the folder to copy the items to.

returnNewItemIds bool

Flag indicating whether service should return new ItemIds or not.

Returns

ServiceResponseCollection<MoveCopyItemResponse>

A ServiceResponseCollection providing copy results for each of the specified item Ids.

CopyItemsInConversations(IEnumerable<KeyValuePair<ConversationId, DateTime?>>, FolderId, FolderId)

Copies the items in the specified conversation to the specified destination folder. Calling this method results in a call to EWS.

public ServiceResponseCollection<ServiceResponse> CopyItemsInConversations(IEnumerable<KeyValuePair<ConversationId, DateTime?>> idLastSyncTimePairs, FolderId contextFolderId, FolderId destinationFolderId)

Parameters

idLastSyncTimePairs IEnumerable<KeyValuePair<ConversationId, DateTime?>>

The pairs of Id of conversation whose items should be copied and the date and time conversation was last synced (Items received after that date will not be copied).

contextFolderId FolderId

The context folder id.

destinationFolderId FolderId

The destination folder id.

Returns

ServiceResponseCollection<ServiceResponse>

CreateItems(IEnumerable<Item>, FolderId, MessageDisposition?, SendInvitationsMode?)

Creates multiple items in a single EWS call. Supported item classes are EmailMessage, Appointment, Contact, PostItem, Task and Item. CreateItems does not support items that have unsaved attachments.

public ServiceResponseCollection<ServiceResponse> CreateItems(IEnumerable<Item> items, FolderId parentFolderId, MessageDisposition? messageDisposition, SendInvitationsMode? sendInvitationsMode)

Parameters

items IEnumerable<Item>

The items to create.

parentFolderId FolderId

The Id of the folder in which to place the newly created items. If null, items are created in their default folders.

messageDisposition MessageDisposition?

Indicates the disposition mode for items of type EmailMessage. Required if items contains at least one EmailMessage instance.

sendInvitationsMode SendInvitationsMode?

Indicates if and how invitations should be sent for items of type Appointment. Required if items contains at least one Appointment instance.

Returns

ServiceResponseCollection<ServiceResponse>

A ServiceResponseCollection providing creation results for each of the specified items.

DeleteItems(IEnumerable<ItemId>, DeleteMode, SendCancellationsMode?, AffectedTaskOccurrence?)

Deletes multiple items in a single call to EWS.

public ServiceResponseCollection<ServiceResponse> DeleteItems(IEnumerable<ItemId> itemIds, DeleteMode deleteMode, SendCancellationsMode? sendCancellationsMode, AffectedTaskOccurrence? affectedTaskOccurrences)

Parameters

itemIds IEnumerable<ItemId>

The Ids of the items to delete.

deleteMode DeleteMode

The deletion mode.

sendCancellationsMode SendCancellationsMode?

Indicates whether cancellation messages should be sent. Required if any of the item Ids represents an Appointment.

affectedTaskOccurrences AffectedTaskOccurrence?

Indicates which instance of a recurring task should be deleted. Required if any of the item Ids represents a Task.

Returns

ServiceResponseCollection<ServiceResponse>

A ServiceResponseCollection providing deletion results for each of the specified item Ids.

DeleteItems(IEnumerable<ItemId>, DeleteMode, SendCancellationsMode?, AffectedTaskOccurrence?, bool)

Deletes multiple items in a single call to EWS.

public ServiceResponseCollection<ServiceResponse> DeleteItems(IEnumerable<ItemId> itemIds, DeleteMode deleteMode, SendCancellationsMode? sendCancellationsMode, AffectedTaskOccurrence? affectedTaskOccurrences, bool suppressReadReceipt)

Parameters

itemIds IEnumerable<ItemId>

The Ids of the items to delete.

deleteMode DeleteMode

The deletion mode.

sendCancellationsMode SendCancellationsMode?

Indicates whether cancellation messages should be sent. Required if any of the item Ids represents an Appointment.

affectedTaskOccurrences AffectedTaskOccurrence?

Indicates which instance of a recurring task should be deleted. Required if any of the item Ids represents a Task.

suppressReadReceipt bool

Whether to suppress read receipts

Returns

ServiceResponseCollection<ServiceResponse>

A ServiceResponseCollection providing deletion results for each of the specified item Ids.

DeleteItemsInConversations(IEnumerable<KeyValuePair<ConversationId, DateTime?>>, FolderId, DeleteMode)

Deletes the items in the specified conversation. Calling this method results in a call to EWS.

public ServiceResponseCollection<ServiceResponse> DeleteItemsInConversations(IEnumerable<KeyValuePair<ConversationId, DateTime?>> idLastSyncTimePairs, FolderId contextFolderId, DeleteMode deleteMode)

Parameters

idLastSyncTimePairs IEnumerable<KeyValuePair<ConversationId, DateTime?>>

The pairs of Id of conversation whose items should be deleted and the date and time conversation was last synced (Items received after that date will not be deleted).

contextFolderId FolderId

The Id of the folder that contains the conversation.

deleteMode DeleteMode

The deletion mode.

Returns

ServiceResponseCollection<ServiceResponse>

DisableAlwaysCategorizeItemsInConversations(IEnumerable<ConversationId>, bool)

Sets up a conversation so that any item received within that conversation is no longer categorized. Calling this method results in a call to EWS.

public ServiceResponseCollection<ServiceResponse> DisableAlwaysCategorizeItemsInConversations(IEnumerable<ConversationId> conversationId, bool processSynchronously)

Parameters

conversationId IEnumerable<ConversationId>

The id of the conversation.

processSynchronously bool

Indicates whether the method should return only once disabling this rule and removing the categories from existing items in the conversation is completely done. If processSynchronously is false, the method returns immediately.

Returns

ServiceResponseCollection<ServiceResponse>

DisableAlwaysDeleteItemsInConversations(IEnumerable<ConversationId>, bool)

Sets up a conversation so that any item received within that conversation is no longer moved to Deleted Items folder. Calling this method results in a call to EWS.

public ServiceResponseCollection<ServiceResponse> DisableAlwaysDeleteItemsInConversations(IEnumerable<ConversationId> conversationId, bool processSynchronously)

Parameters

conversationId IEnumerable<ConversationId>

The id of the conversation.

processSynchronously bool

Indicates whether the method should return only once disabling this rule and restoring the items in the conversation is completely done. If processSynchronously is false, the method returns immediately.

Returns

ServiceResponseCollection<ServiceResponse>

DisableAlwaysMoveItemsInConversations(IEnumerable<ConversationId>, bool)

Sets up a conversation so that any item received within that conversation is no longer moved to a specific folder. Calling this method results in a call to EWS.

public ServiceResponseCollection<ServiceResponse> DisableAlwaysMoveItemsInConversations(IEnumerable<ConversationId> conversationIds, bool processSynchronously)

Parameters

conversationIds IEnumerable<ConversationId>

The conversation ids.

processSynchronously bool

Indicates whether the method should return only once disabling this rule is completely done. If processSynchronously is false, the method returns immediately.

Returns

ServiceResponseCollection<ServiceResponse>

DisableApp(string, DisableReasonType)

Disable App.

public void DisableApp(string id, DisableReasonType disableReason)

Parameters

id string

App ID

disableReason DisableReasonType

Disable reason

Remarks

Exception will be thrown for errors.

EnableAlwaysCategorizeItemsInConversations(IEnumerable<ConversationId>, IEnumerable<string>, bool)

Sets up a conversation so that any item received within that conversation is always categorized. Calling this method results in a call to EWS.

public ServiceResponseCollection<ServiceResponse> EnableAlwaysCategorizeItemsInConversations(IEnumerable<ConversationId> conversationId, IEnumerable<string> categories, bool processSynchronously)

Parameters

conversationId IEnumerable<ConversationId>

The id of the conversation.

categories IEnumerable<string>

The categories that should be stamped on items in the conversation.

processSynchronously bool

Indicates whether the method should return only once enabling this rule and stamping existing items in the conversation is completely done. If processSynchronously is false, the method returns immediately.

Returns

ServiceResponseCollection<ServiceResponse>

EnableAlwaysDeleteItemsInConversations(IEnumerable<ConversationId>, bool)

Sets up a conversation so that any item received within that conversation is always moved to Deleted Items folder. Calling this method results in a call to EWS.

public ServiceResponseCollection<ServiceResponse> EnableAlwaysDeleteItemsInConversations(IEnumerable<ConversationId> conversationId, bool processSynchronously)

Parameters

conversationId IEnumerable<ConversationId>

The id of the conversation.

processSynchronously bool

Indicates whether the method should return only once enabling this rule and deleting existing items in the conversation is completely done. If processSynchronously is false, the method returns immediately.

Returns

ServiceResponseCollection<ServiceResponse>

EnableAlwaysMoveItemsInConversations(IEnumerable<ConversationId>, FolderId, bool)

Sets up a conversation so that any item received within that conversation is always moved to a specific folder. Calling this method results in a call to EWS.

public ServiceResponseCollection<ServiceResponse> EnableAlwaysMoveItemsInConversations(IEnumerable<ConversationId> conversationId, FolderId destinationFolderId, bool processSynchronously)

Parameters

conversationId IEnumerable<ConversationId>

The id of the conversation.

destinationFolderId FolderId

The Id of the folder to which conversation items should be moved.

processSynchronously bool

Indicates whether the method should return only once enabling this rule and moving existing items in the conversation is completely done. If processSynchronously is false, the method returns immediately.

Returns

ServiceResponseCollection<ServiceResponse>

EndGetNonIndexableItemDetails(IAsyncResult)

Asynchronous call to get non indexable item details

public GetNonIndexableItemDetailsResponse EndGetNonIndexableItemDetails(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

Returns

GetNonIndexableItemDetailsResponse

EndGetNonIndexableItemStatistics(IAsyncResult)

Asynchronous call to get non indexable item statistics

public GetNonIndexableItemStatisticsResponse EndGetNonIndexableItemStatistics(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

Returns

GetNonIndexableItemStatisticsResponse

EndSearchMailboxes(IAsyncResult)

Asynchronous call to end search mailboxes

public ServiceResponseCollection<SearchMailboxesResponse> EndSearchMailboxes(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

Returns

ServiceResponseCollection<SearchMailboxesResponse>

EndSubscribeToPullNotifications(IAsyncResult)

Ends an asynchronous request to subscribe to pull notifications in the authenticated user's mailbox.

public PullSubscription EndSubscribeToPullNotifications(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the asynchronous request.

Returns

PullSubscription

A PullSubscription representing the new subscription.

EndSubscribeToPushNotifications(IAsyncResult)

Ends an asynchronous request to subscribe to push notifications in the authenticated user's mailbox.

public PushSubscription EndSubscribeToPushNotifications(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the asynchronous request.

Returns

PushSubscription

A PushSubscription representing the new subscription.

EndSubscribeToStreamingNotifications(IAsyncResult)

Ends an asynchronous request to subscribe to streaming notifications in the authenticated user's mailbox. Calling this method results in a call to EWS.

public StreamingSubscription EndSubscribeToStreamingNotifications(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the asynchronous request.

Returns

StreamingSubscription

A StreamingSubscription representing the new subscription.

EndSyncFolderHierarchy(IAsyncResult)

Ends an asynchronous request to synchronize the specified folder hierarchy of the mailbox this Service is connected to.

public ChangeCollection<FolderChange> EndSyncFolderHierarchy(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the asynchronous request.

Returns

ChangeCollection<FolderChange>

A ChangeCollection containing a list of changes that occurred in the specified folder.

EndSyncFolderItems(IAsyncResult)

Ends an asynchronous request to synchronize the items of a specific folder.

public ChangeCollection<ItemChange> EndSyncFolderItems(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the asynchronous request.

Returns

ChangeCollection<ItemChange>

A ChangeCollection containing a list of changes that occurred in the specified folder.

ExpandGroup(EmailAddress)

Expands a group by retrieving a list of its members. Calling this method results in a call to EWS.

public ExpandGroupResults ExpandGroup(EmailAddress emailAddress)

Parameters

emailAddress EmailAddress

The e-mail address of the group.

Returns

ExpandGroupResults

An ExpandGroupResults containing the members of the group.

ExpandGroup(ItemId)

Expands a group by retrieving a list of its members. Calling this method results in a call to EWS.

public ExpandGroupResults ExpandGroup(ItemId groupId)

Parameters

groupId ItemId

The Id of the group to expand.

Returns

ExpandGroupResults

An ExpandGroupResults containing the members of the group.

ExpandGroup(string)

Expands a group by retrieving a list of its members. Calling this method results in a call to EWS.

public ExpandGroupResults ExpandGroup(string smtpAddress)

Parameters

smtpAddress string

The SMTP address of the group to expand.

Returns

ExpandGroupResults

An ExpandGroupResults containing the members of the group.

ExpandGroup(string, string)

Expands a group by retrieving a list of its members. Calling this method results in a call to EWS.

public ExpandGroupResults ExpandGroup(string address, string routingType)

Parameters

address string

The SMTP address of the group to expand.

routingType string

The routing type of the address of the group to expand.

Returns

ExpandGroupResults

An ExpandGroupResults containing the members of the group.

FindAppointments(FolderId, CalendarView)

Obtains a list of appointments by searching the contents of a specific folder. Calling this method results in a call to EWS.

public FindItemsResults<Appointment> FindAppointments(FolderId parentFolderId, CalendarView calendarView)

Parameters

parentFolderId FolderId

The id of the calendar folder in which to search for items.

calendarView CalendarView

The calendar view controlling the number of appointments returned.

Returns

FindItemsResults<Appointment>

A collection of appointments representing the contents of the specified folder.

FindAppointments(WellKnownFolderName, CalendarView)

Obtains a list of appointments by searching the contents of a specific folder. Calling this method results in a call to EWS.

public FindItemsResults<Appointment> FindAppointments(WellKnownFolderName parentFolderName, CalendarView calendarView)

Parameters

parentFolderName WellKnownFolderName

The name of the calendar folder in which to search for items.

calendarView CalendarView

The calendar view controlling the number of appointments returned.

Returns

FindItemsResults<Appointment>

A collection of appointments representing the contents of the specified folder.

FindConversation(ViewBase, FolderId)

Retrieves a collection of all Conversations in the specified Folder.

public ICollection<Conversation> FindConversation(ViewBase view, FolderId folderId)

Parameters

view ViewBase

The view controlling the number of conversations returned.

folderId FolderId

The Id of the folder in which to search for conversations.

Returns

ICollection<Conversation>

Collection of conversations.

FindConversation(ViewBase, FolderId, string)

Retrieves a collection of all Conversations in the specified Folder.

public ICollection<Conversation> FindConversation(ViewBase view, FolderId folderId, string queryString)

Parameters

view ViewBase

The view controlling the number of conversations returned.

folderId FolderId

The Id of the folder in which to search for conversations.

queryString string

The query string for which the search is being performed

Returns

ICollection<Conversation>

Collection of conversations.

FindConversation(ViewBase, FolderId, string, bool)

Searches for and retrieves a collection of Conversations in the specified Folder. Along with conversations, a list of highlight terms are returned.

public FindConversationResults FindConversation(ViewBase view, FolderId folderId, string queryString, bool returnHighlightTerms)

Parameters

view ViewBase

The view controlling the number of conversations returned.

folderId FolderId

The Id of the folder in which to search for conversations.

queryString string

The query string for which the search is being performed

returnHighlightTerms bool

Flag indicating if highlight terms should be returned in the response

Returns

FindConversationResults

FindConversation results.

FindConversation(ViewBase, FolderId, string, bool, MailboxSearchLocation?)

Searches for and retrieves a collection of Conversations in the specified Folder. Along with conversations, a list of highlight terms are returned.

public FindConversationResults FindConversation(ViewBase view, FolderId folderId, string queryString, bool returnHighlightTerms, MailboxSearchLocation? mailboxScope)

Parameters

view ViewBase

The view controlling the number of conversations returned.

folderId FolderId

The Id of the folder in which to search for conversations.

queryString string

The query string for which the search is being performed

returnHighlightTerms bool

Flag indicating if highlight terms should be returned in the response

mailboxScope MailboxSearchLocation?

The mailbox scope to reference.

Returns

FindConversationResults

FindConversation results.

FindFolders(FolderId, FolderView)

Obtains a list of folders by searching the sub-folders of the specified folder.

public FindFoldersResults FindFolders(FolderId parentFolderId, FolderView view)

Parameters

parentFolderId FolderId

The Id of the folder in which to search for folders.

view FolderView

The view controlling the number of folders returned.

Returns

FindFoldersResults

An object representing the results of the search operation.

FindFolders(FolderId, SearchFilter, FolderView)

Obtains a list of folders by searching the sub-folders of the specified folder.

public FindFoldersResults FindFolders(FolderId parentFolderId, SearchFilter searchFilter, FolderView view)

Parameters

parentFolderId FolderId

The Id of the folder in which to search for folders.

searchFilter SearchFilter

The search filter. Available search filter classes include SearchFilter.IsEqualTo, SearchFilter.ContainsSubstring and SearchFilter.SearchFilterCollection

view FolderView

The view controlling the number of folders returned.

Returns

FindFoldersResults

An object representing the results of the search operation.

FindFolders(WellKnownFolderName, FolderView)

Obtains a list of folders by searching the sub-folders of the specified folder.

public FindFoldersResults FindFolders(WellKnownFolderName parentFolderName, FolderView view)

Parameters

parentFolderName WellKnownFolderName

The name of the folder in which to search for folders.

view FolderView

The view controlling the number of folders returned.

Returns

FindFoldersResults

An object representing the results of the search operation.

FindFolders(WellKnownFolderName, SearchFilter, FolderView)

Obtains a list of folders by searching the sub-folders of the specified folder.

public FindFoldersResults FindFolders(WellKnownFolderName parentFolderName, SearchFilter searchFilter, FolderView view)

Parameters

parentFolderName WellKnownFolderName

The name of the folder in which to search for folders.

searchFilter SearchFilter

The search filter. Available search filter classes include SearchFilter.IsEqualTo, SearchFilter.ContainsSubstring and SearchFilter.SearchFilterCollection

view FolderView

The view controlling the number of folders returned.

Returns

FindFoldersResults

An object representing the results of the search operation.

FindItems(FolderId, SearchFilter, ViewBase)

Obtains a list of items by searching the contents of a specific folder. Calling this method results in a call to EWS.

public FindItemsResults<Item> FindItems(FolderId parentFolderId, SearchFilter searchFilter, ViewBase view)

Parameters

parentFolderId FolderId

The Id of the folder in which to search for items.

searchFilter SearchFilter

The search filter. Available search filter classes include SearchFilter.IsEqualTo, SearchFilter.ContainsSubstring and SearchFilter.SearchFilterCollection

view ViewBase

The view controlling the number of items returned.

Returns

FindItemsResults<Item>

An object representing the results of the search operation.

FindItems(FolderId, SearchFilter, ViewBase, Grouping)

Obtains a grouped list of items by searching the contents of a specific folder. Calling this method results in a call to EWS.

public GroupedFindItemsResults<Item> FindItems(FolderId parentFolderId, SearchFilter searchFilter, ViewBase view, Grouping groupBy)

Parameters

parentFolderId FolderId

The Id of the folder in which to search for items.

searchFilter SearchFilter

The search filter. Available search filter classes include SearchFilter.IsEqualTo, SearchFilter.ContainsSubstring and SearchFilter.SearchFilterCollection

view ViewBase

The view controlling the number of items returned.

groupBy Grouping

The group by clause.

Returns

GroupedFindItemsResults<Item>

A list of items containing the contents of the specified folder.

FindItems(FolderId, ViewBase)

Obtains a list of items by searching the contents of a specific folder. Calling this method results in a call to EWS.

public FindItemsResults<Item> FindItems(FolderId parentFolderId, ViewBase view)

Parameters

parentFolderId FolderId

The Id of the folder in which to search for items.

view ViewBase

The view controlling the number of items returned.

Returns

FindItemsResults<Item>

An object representing the results of the search operation.

FindItems(FolderId, ViewBase, Grouping)

Obtains a grouped list of items by searching the contents of a specific folder. Calling this method results in a call to EWS.

public GroupedFindItemsResults<Item> FindItems(FolderId parentFolderId, ViewBase view, Grouping groupBy)

Parameters

parentFolderId FolderId

The Id of the folder in which to search for items.

view ViewBase

The view controlling the number of items returned.

groupBy Grouping

The group by clause.

Returns

GroupedFindItemsResults<Item>

A list of items containing the contents of the specified folder.

FindItems(FolderId, string, ViewBase)

Obtains a list of items by searching the contents of a specific folder. Calling this method results in a call to EWS.

public FindItemsResults<Item> FindItems(FolderId parentFolderId, string queryString, ViewBase view)

Parameters

parentFolderId FolderId

The Id of the folder in which to search for items.

queryString string

the search string to be used for indexed search, if any.

view ViewBase

The view controlling the number of items returned.

Returns

FindItemsResults<Item>

An object representing the results of the search operation.

FindItems(FolderId, string, ViewBase, Grouping)

Obtains a grouped list of items by searching the contents of a specific folder. Calling this method results in a call to EWS.

public GroupedFindItemsResults<Item> FindItems(FolderId parentFolderId, string queryString, ViewBase view, Grouping groupBy)

Parameters

parentFolderId FolderId

The Id of the folder in which to search for items.

queryString string

query string to be used for indexed search

view ViewBase

The view controlling the number of items returned.

groupBy Grouping

The group by clause.

Returns

GroupedFindItemsResults<Item>

A list of items containing the contents of the specified folder.

FindItems(FolderId, string, bool, ViewBase)

Obtains a list of items by searching the contents of a specific folder. Along with conversations, a list of highlight terms are returned. Calling this method results in a call to EWS.

public FindItemsResults<Item> FindItems(FolderId parentFolderId, string queryString, bool returnHighlightTerms, ViewBase view)

Parameters

parentFolderId FolderId

The Id of the folder in which to search for items.

queryString string

the search string to be used for indexed search, if any.

returnHighlightTerms bool

Flag indicating if highlight terms should be returned in the response

view ViewBase

The view controlling the number of items returned.

Returns

FindItemsResults<Item>

An object representing the results of the search operation.

FindItems(FolderId, string, bool, ViewBase, Grouping)

Obtains a list of items by searching the contents of a specific folder. Along with conversations, a list of highlight terms are returned. Calling this method results in a call to EWS.

public GroupedFindItemsResults<Item> FindItems(FolderId parentFolderId, string queryString, bool returnHighlightTerms, ViewBase view, Grouping groupBy)

Parameters

parentFolderId FolderId

The Id of the folder in which to search for items.

queryString string

the search string to be used for indexed search, if any.

returnHighlightTerms bool

Flag indicating if highlight terms should be returned in the response

view ViewBase

The view controlling the number of items returned.

groupBy Grouping

The group by clause.

Returns

GroupedFindItemsResults<Item>

An object representing the results of the search operation.

FindItems(WellKnownFolderName, SearchFilter, ViewBase)

Obtains a list of items by searching the contents of a specific folder. Calling this method results in a call to EWS.

public FindItemsResults<Item> FindItems(WellKnownFolderName parentFolderName, SearchFilter searchFilter, ViewBase view)

Parameters

parentFolderName WellKnownFolderName

The name of the folder in which to search for items.

searchFilter SearchFilter

The search filter. Available search filter classes include SearchFilter.IsEqualTo, SearchFilter.ContainsSubstring and SearchFilter.SearchFilterCollection

view ViewBase

The view controlling the number of items returned.

Returns

FindItemsResults<Item>

An object representing the results of the search operation.

FindItems(WellKnownFolderName, SearchFilter, ViewBase, Grouping)

Obtains a grouped list of items by searching the contents of a specific folder. Calling this method results in a call to EWS.

public GroupedFindItemsResults<Item> FindItems(WellKnownFolderName parentFolderName, SearchFilter searchFilter, ViewBase view, Grouping groupBy)

Parameters

parentFolderName WellKnownFolderName

The name of the folder in which to search for items.

searchFilter SearchFilter

The search filter. Available search filter classes include SearchFilter.IsEqualTo, SearchFilter.ContainsSubstring and SearchFilter.SearchFilterCollection

view ViewBase

The view controlling the number of items returned.

groupBy Grouping

The group by clause.

Returns

GroupedFindItemsResults<Item>

A collection of grouped items representing the contents of the specified.

FindItems(WellKnownFolderName, ViewBase)

Obtains a list of items by searching the contents of a specific folder. Calling this method results in a call to EWS.

public FindItemsResults<Item> FindItems(WellKnownFolderName parentFolderName, ViewBase view)

Parameters

parentFolderName WellKnownFolderName

The name of the folder in which to search for items.

view ViewBase

The view controlling the number of items returned.

Returns

FindItemsResults<Item>

An object representing the results of the search operation.

FindItems(WellKnownFolderName, string, ViewBase)

Obtains a list of items by searching the contents of a specific folder. Calling this method results in a call to EWS.

public FindItemsResults<Item> FindItems(WellKnownFolderName parentFolderName, string queryString, ViewBase view)

Parameters

parentFolderName WellKnownFolderName

The name of the folder in which to search for items.

queryString string

query string to be used for indexed search

view ViewBase

The view controlling the number of items returned.

Returns

FindItemsResults<Item>

An object representing the results of the search operation.

FindItems(WellKnownFolderName, string, ViewBase, Grouping)

Obtains a grouped list of items by searching the contents of a specific folder. Calling this method results in a call to EWS.

public GroupedFindItemsResults<Item> FindItems(WellKnownFolderName parentFolderName, string queryString, ViewBase view, Grouping groupBy)

Parameters

parentFolderName WellKnownFolderName

The name of the folder in which to search for items.

queryString string

query string to be used for indexed search

view ViewBase

The view controlling the number of items returned.

groupBy Grouping

The group by clause.

Returns

GroupedFindItemsResults<Item>

A collection of grouped items representing the contents of the specified.

GetAppManifests()

Get the app manifests.

public Collection<XmlDocument> GetAppManifests()

Returns

Collection<XmlDocument>

Collection of manifests

GetAppManifests(string, string)

Get the app manifests. Works with Exchange 2013 SP1 or later EWS.

public Collection<ClientApp> GetAppManifests(string apiVersionSupported, string schemaVersionSupported)

Parameters

apiVersionSupported string

The api version supported by the client.

schemaVersionSupported string

The schema version supported by the client.

Returns

Collection<ClientApp>

Collection of manifests

GetAppMarketplaceUrl()

Get App Marketplace Url.

public string GetAppMarketplaceUrl()

Returns

string

Remarks

Exception will be thrown for errors.

GetAppMarketplaceUrl(string, string)

Get App Marketplace Url. Works with Exchange 2013 SP1 or later EWS.

public string GetAppMarketplaceUrl(string apiVersionSupported, string schemaVersionSupported)

Parameters

apiVersionSupported string

The api version supported by the client.

schemaVersionSupported string

The schema version supported by the client.

Returns

string

Remarks

Exception will be thrown for errors.

GetAttachments(Attachment[], BodyType?, IEnumerable<PropertyDefinitionBase>)

Gets attachments.

public ServiceResponseCollection<GetAttachmentResponse> GetAttachments(Attachment[] attachments, BodyType? bodyType, IEnumerable<PropertyDefinitionBase> additionalProperties)

Parameters

attachments Attachment[]

The attachments.

bodyType BodyType?

Type of the body.

additionalProperties IEnumerable<PropertyDefinitionBase>

The additional properties.

Returns

ServiceResponseCollection<GetAttachmentResponse>

Service response collection.

GetAttachments(string[], BodyType?, IEnumerable<PropertyDefinitionBase>)

Gets attachments.

public ServiceResponseCollection<GetAttachmentResponse> GetAttachments(string[] attachmentIds, BodyType? bodyType, IEnumerable<PropertyDefinitionBase> additionalProperties)

Parameters

attachmentIds string[]

The attachment ids.

bodyType BodyType?

Type of the body.

additionalProperties IEnumerable<PropertyDefinitionBase>

The additional properties.

Returns

ServiceResponseCollection<GetAttachmentResponse>

Service response collection.

GetClientAccessToken(ClientAccessTokenRequest[])

GetClientAccessToken

public ServiceResponseCollection<GetClientAccessTokenResponse> GetClientAccessToken(ClientAccessTokenRequest[] tokenRequests)

Parameters

tokenRequests ClientAccessTokenRequest[]

Token requests array

Returns

ServiceResponseCollection<GetClientAccessTokenResponse>

A ServiceResponseCollection providing token results for each of the specified id and types.

GetClientAccessToken(IEnumerable<KeyValuePair<string, ClientAccessTokenType>>)

GetClientAccessToken

public ServiceResponseCollection<GetClientAccessTokenResponse> GetClientAccessToken(IEnumerable<KeyValuePair<string, ClientAccessTokenType>> idAndTypes)

Parameters

idAndTypes IEnumerable<KeyValuePair<string, ClientAccessTokenType>>

Id and Types

Returns

ServiceResponseCollection<GetClientAccessTokenResponse>

A ServiceResponseCollection providing token results for each of the specified id and types.

GetClientExtension(StringList, bool, bool, string, StringList, StringList, bool)

Get the client extension data. This method is used in server-to-server calls to retrieve ORG extensions for admin powershell/UMC access and user's powershell/UMC access as well as user's activation for OWA/Outlook. This is expected to never be used or called directly from user client.

public GetClientExtensionResponse GetClientExtension(StringList requestedExtensionIds, bool shouldReturnEnabledOnly, bool isUserScope, string userId, StringList userEnabledExtensionIds, StringList userDisabledExtensionIds, bool isDebug)

Parameters

requestedExtensionIds StringList

An array of requested extension IDs to return.

shouldReturnEnabledOnly bool

Whether enabled extension only should be returned, e.g. for user's OWA/Outlook activation scenario.

isUserScope bool

Whether it's called from admin or user scope

userId string

Specifies optional (if called with user scope) user identity. This will allow to do proper filtering in cases where admin installs an extension for specific users only

userEnabledExtensionIds StringList

Optional list of org extension IDs which user enabled. This is necessary for proper result filtering on the server end. E.g. if admin installed N extensions but didn't enable them, it does not make sense to return manifests for those which user never enabled either. Used only when asked for enabled extension only (activation scenario).

userDisabledExtensionIds StringList

Optional list of org extension IDs which user disabled. This is necessary for proper result filtering on the server end. E.g. if admin installed N optional extensions and enabled them, it does not make sense to retrieve manifests for extensions which user disabled for him or herself. Used only when asked for enabled extension only (activation scenario).

isDebug bool

Optional flag to indicate whether it is debug mode. If it is, org master table in arbitration mailbox will be returned for debugging purpose.

Returns

GetClientExtensionResponse

Collection of ClientExtension objects

GetConversationItems(ConversationId, PropertySet, string, IEnumerable<FolderId>, ConversationSortOrder?)

Gets the items for a conversation.

public ConversationResponse GetConversationItems(ConversationId conversationId, PropertySet propertySet, string syncState, IEnumerable<FolderId> foldersToIgnore, ConversationSortOrder? sortOrder)

Parameters

conversationId ConversationId

The conversation id.

propertySet PropertySet

The set of properties to load.

syncState string

The optional sync state representing the point in time when to start the synchronization.

foldersToIgnore IEnumerable<FolderId>

The folders to ignore.

sortOrder ConversationSortOrder?

Conversation item sort order.

Returns

ConversationResponse

ConversationResponseType response.

GetConversationItems(IEnumerable<ConversationRequest>, PropertySet, IEnumerable<FolderId>, ConversationSortOrder?)

Gets the items for a set of conversations.

public ServiceResponseCollection<GetConversationItemsResponse> GetConversationItems(IEnumerable<ConversationRequest> conversations, PropertySet propertySet, IEnumerable<FolderId> foldersToIgnore, ConversationSortOrder? sortOrder)

Parameters

conversations IEnumerable<ConversationRequest>

Conversations with items to load.

propertySet PropertySet

The set of properties to load.

foldersToIgnore IEnumerable<FolderId>

The folders to ignore.

sortOrder ConversationSortOrder?

Conversation item sort order.

Returns

ServiceResponseCollection<GetConversationItemsResponse>

GetConversationItems response.

GetConversationItems(IEnumerable<ConversationRequest>, PropertySet, IEnumerable<FolderId>, ConversationSortOrder?, MailboxSearchLocation?)

Gets the items for a set of conversations.

public ServiceResponseCollection<GetConversationItemsResponse> GetConversationItems(IEnumerable<ConversationRequest> conversations, PropertySet propertySet, IEnumerable<FolderId> foldersToIgnore, ConversationSortOrder? sortOrder, MailboxSearchLocation? mailboxScope)

Parameters

conversations IEnumerable<ConversationRequest>

Conversations with items to load.

propertySet PropertySet

The set of properties to load.

foldersToIgnore IEnumerable<FolderId>

The folders to ignore.

sortOrder ConversationSortOrder?

Conversation item sort order.

mailboxScope MailboxSearchLocation?

The mailbox scope to reference.

Returns

ServiceResponseCollection<GetConversationItemsResponse>

GetConversationItems response.

GetDelegates(Mailbox, bool, params UserId[])

Retrieves the delegates of a specific mailbox. Calling this method results in a call to EWS.

public DelegateInformation GetDelegates(Mailbox mailbox, bool includePermissions, params UserId[] userIds)

Parameters

mailbox Mailbox

The mailbox to retrieve the delegates of.

includePermissions bool

Indicates whether detailed permissions should be returned fro each delegate.

userIds UserId[]

The optional Ids of the delegate users to retrieve.

Returns

DelegateInformation

A GetDelegateResponse providing the results of the operation.

GetDelegates(Mailbox, bool, IEnumerable<UserId>)

Retrieves the delegates of a specific mailbox. Calling this method results in a call to EWS.

public DelegateInformation GetDelegates(Mailbox mailbox, bool includePermissions, IEnumerable<UserId> userIds)

Parameters

mailbox Mailbox

The mailbox to retrieve the delegates of.

includePermissions bool

Indicates whether detailed permissions should be returned fro each delegate.

userIds IEnumerable<UserId>

The optional Ids of the delegate users to retrieve.

Returns

DelegateInformation

A GetDelegateResponse providing the results of the operation.

GetDiscoverySearchConfiguration(string, bool, bool)

Get dicovery search configuration

public GetDiscoverySearchConfigurationResponse GetDiscoverySearchConfiguration(string searchId, bool expandGroupMembership, bool inPlaceHoldConfigurationOnly)

Parameters

searchId string

Search Id

expandGroupMembership bool

True if want to expand group membership

inPlaceHoldConfigurationOnly bool

True if only want the inplacehold configuration

Returns

GetDiscoverySearchConfigurationResponse

Service response object

GetEncryptionConfiguration()

Get the encryption configuration data. This method is used in server-to-server calls to retrieve encryption configuration

public GetEncryptionConfigurationResponse GetEncryptionConfiguration()

Returns

GetEncryptionConfigurationResponse

Encryption Configuration response object

GetHoldOnMailboxes(string)

Get hold on mailboxes

public GetHoldOnMailboxesResponse GetHoldOnMailboxes(string holdId)

Parameters

holdId string

Hold id

Returns

GetHoldOnMailboxesResponse

Service response object

GetInboxRules()

Retrieves inbox rules of the authenticated user.

public RuleCollection GetInboxRules()

Returns

RuleCollection

A RuleCollection object containing the authenticated user's inbox rules.

GetInboxRules(string)

Retrieves the inbox rules of the specified user.

public RuleCollection GetInboxRules(string mailboxSmtpAddress)

Parameters

mailboxSmtpAddress string

The SMTP address of the user whose inbox rules should be retrieved.

Returns

RuleCollection

A RuleCollection object containing the inbox rules of the specified user.

GetNonIndexableItemDetails(GetNonIndexableItemDetailsParameters)

Get non indexable item details

public GetNonIndexableItemDetailsResponse GetNonIndexableItemDetails(GetNonIndexableItemDetailsParameters parameters)

Parameters

parameters GetNonIndexableItemDetailsParameters

Get non indexable item details parameters

Returns

GetNonIndexableItemDetailsResponse

Service response object

GetNonIndexableItemDetails(string[])

Get non indexable item details

public GetNonIndexableItemDetailsResponse GetNonIndexableItemDetails(string[] mailboxes)

Parameters

mailboxes string[]

Array of mailbox legacy DN

Returns

GetNonIndexableItemDetailsResponse

Service response object

GetNonIndexableItemDetails(string[], int?, string, SearchPageDirection?)

Get non indexable item details

public GetNonIndexableItemDetailsResponse GetNonIndexableItemDetails(string[] mailboxes, int? pageSize, string pageItemReference, SearchPageDirection? pageDirection)

Parameters

mailboxes string[]

Array of mailbox legacy DN

pageSize int?

The page size

pageItemReference string

Page item reference

pageDirection SearchPageDirection?

Page direction

Returns

GetNonIndexableItemDetailsResponse

Service response object

GetNonIndexableItemStatistics(GetNonIndexableItemStatisticsParameters)

Get non indexable item statistics

public GetNonIndexableItemStatisticsResponse GetNonIndexableItemStatistics(GetNonIndexableItemStatisticsParameters parameters)

Parameters

parameters GetNonIndexableItemStatisticsParameters

Get non indexable item statistics parameters

Returns

GetNonIndexableItemStatisticsResponse

Service response object

GetNonIndexableItemStatistics(string[])

Get non indexable item statistics

public GetNonIndexableItemStatisticsResponse GetNonIndexableItemStatistics(string[] mailboxes)

Parameters

mailboxes string[]

Array of mailbox legacy DN

Returns

GetNonIndexableItemStatisticsResponse

Service response object

GetPasswordExpirationDate(string)

Get the password expiration date

public DateTime? GetPasswordExpirationDate(string mailboxSmtpAddress)

Parameters

mailboxSmtpAddress string

The e-mail address of the user.

Returns

DateTime?

The password expiration date.

GetRoomLists()

Retrieves a collection of all room lists in the organization.

public EmailAddressCollection GetRoomLists()

Returns

EmailAddressCollection

An EmailAddressCollection containing all the room lists in the organization.

GetRooms(EmailAddress)

Retrieves a collection of all rooms in the specified room list in the organization.

public Collection<EmailAddress> GetRooms(EmailAddress emailAddress)

Parameters

emailAddress EmailAddress

The e-mail address of the room list.

Returns

Collection<EmailAddress>

A collection of EmailAddress objects representing all the rooms within the specifed room list.

GetSearchableMailboxes(string, bool)

Get searchable mailboxes

public GetSearchableMailboxesResponse GetSearchableMailboxes(string searchFilter, bool expandGroupMembership)

Parameters

searchFilter string

Search filter

expandGroupMembership bool

True if want to expand group membership

Returns

GetSearchableMailboxesResponse

Service response object

GetUserAvailability(IEnumerable<AttendeeInfo>, TimeWindow, AvailabilityData)

Gets detailed information about the availability of a set of users, rooms, and resources within a specified time window.

public GetUserAvailabilityResults GetUserAvailability(IEnumerable<AttendeeInfo> attendees, TimeWindow timeWindow, AvailabilityData requestedData)

Parameters

attendees IEnumerable<AttendeeInfo>

The attendees for which to retrieve availability information.

timeWindow TimeWindow

The time window in which to retrieve user availability information.

requestedData AvailabilityData

The requested data (free/busy and/or suggestions).

Returns

GetUserAvailabilityResults

The availability information for each user appears in a unique FreeBusyResponse object. The order of users in the request determines the order of availability data for each user in the response.

GetUserAvailability(IEnumerable<AttendeeInfo>, TimeWindow, AvailabilityData, AvailabilityOptions)

Gets detailed information about the availability of a set of users, rooms, and resources within a specified time window.

public GetUserAvailabilityResults GetUserAvailability(IEnumerable<AttendeeInfo> attendees, TimeWindow timeWindow, AvailabilityData requestedData, AvailabilityOptions options)

Parameters

attendees IEnumerable<AttendeeInfo>

The attendees for which to retrieve availability information.

timeWindow TimeWindow

The time window in which to retrieve user availability information.

requestedData AvailabilityData

The requested data (free/busy and/or suggestions).

options AvailabilityOptions

The options controlling the information returned.

Returns

GetUserAvailabilityResults

The availability information for each user appears in a unique FreeBusyResponse object. The order of users in the request determines the order of availability data for each user in the response.

GetUserOofSettings(string)

Gets Out of Office (OOF) settings for a specific user. Calling this method results in a call to EWS.

public OofSettings GetUserOofSettings(string smtpAddress)

Parameters

smtpAddress string

The SMTP address of the user for which to retrieve OOF settings.

Returns

OofSettings

An OofSettings instance containing OOF information for the specified user.

GetUserRetentionPolicyTags()

Get user retention policy tags.

public GetUserRetentionPolicyTagsResponse GetUserRetentionPolicyTags()

Returns

GetUserRetentionPolicyTagsResponse

Service response object.

InstallApp(Stream)

Install App.

public void InstallApp(Stream manifestStream)

Parameters

manifestStream Stream

The manifest's plain text XML stream. Notice: Stream has state. If you want this function read from the expected position of the stream, please make sure set read position by manifestStream.Position = expectedPosition. Be aware read manifestStream.Lengh puts stream's Position at stream end. If you retrieve manifestStream.Lengh before call this function, nothing will be read. When this function succeeds, manifestStream is closed. This is by EWS design to release resource in timely manner.

Remarks

Exception will be thrown for errors.

LoadPropertiesForItems(IEnumerable<Item>, PropertySet)

Loads the properties of multiple items in a single call to EWS.

public ServiceResponseCollection<ServiceResponse> LoadPropertiesForItems(IEnumerable<Item> items, PropertySet propertySet)

Parameters

items IEnumerable<Item>

The items to load the properties of.

propertySet PropertySet

The set of properties to load.

Returns

ServiceResponseCollection<ServiceResponse>

A ServiceResponseCollection providing results for each of the specified items.

MarkAsJunk(IEnumerable<ItemId>, bool, bool)

Mark items as junk.

public ServiceResponseCollection<MarkAsJunkResponse> MarkAsJunk(IEnumerable<ItemId> itemIds, bool isJunk, bool moveItem)

Parameters

itemIds IEnumerable<ItemId>

ItemIds for the items to mark

isJunk bool

Whether the items are junk. If true, senders are add to blocked sender list. If false, senders are removed.

moveItem bool

Whether to move the item. Items are moved to junk folder if isJunk is true, inbox if isJunk is false.

Returns

ServiceResponseCollection<MarkAsJunkResponse>

A ServiceResponseCollection providing itemIds for each of the moved items..

MoveItems(IEnumerable<ItemId>, FolderId)

Moves multiple items in a single call to EWS.

public ServiceResponseCollection<MoveCopyItemResponse> MoveItems(IEnumerable<ItemId> itemIds, FolderId destinationFolderId)

Parameters

itemIds IEnumerable<ItemId>

The Ids of the items to move.

destinationFolderId FolderId

The Id of the folder to move the items to.

Returns

ServiceResponseCollection<MoveCopyItemResponse>

A ServiceResponseCollection providing copy results for each of the specified item Ids.

MoveItems(IEnumerable<ItemId>, FolderId, bool)

Moves multiple items in a single call to EWS.

public ServiceResponseCollection<MoveCopyItemResponse> MoveItems(IEnumerable<ItemId> itemIds, FolderId destinationFolderId, bool returnNewItemIds)

Parameters

itemIds IEnumerable<ItemId>

The Ids of the items to move.

destinationFolderId FolderId

The Id of the folder to move the items to.

returnNewItemIds bool

Flag indicating whether service should return new ItemIds or not.

Returns

ServiceResponseCollection<MoveCopyItemResponse>

A ServiceResponseCollection providing copy results for each of the specified item Ids.

MoveItemsInConversations(IEnumerable<KeyValuePair<ConversationId, DateTime?>>, FolderId, FolderId)

Moves the items in the specified conversation to the specified destination folder. Calling this method results in a call to EWS.

public ServiceResponseCollection<ServiceResponse> MoveItemsInConversations(IEnumerable<KeyValuePair<ConversationId, DateTime?>> idLastSyncTimePairs, FolderId contextFolderId, FolderId destinationFolderId)

Parameters

idLastSyncTimePairs IEnumerable<KeyValuePair<ConversationId, DateTime?>>

The pairs of Id of conversation whose items should be moved and the dateTime conversation was last synced (Items received after that dateTime will not be moved).

contextFolderId FolderId

The Id of the folder that contains the conversation.

destinationFolderId FolderId

The Id of the destination folder.

Returns

ServiceResponseCollection<ServiceResponse>

RemoveDelegates(Mailbox, params UserId[])

Removes delegates on a specific mailbox. Calling this method results in a call to EWS.

public Collection<DelegateUserResponse> RemoveDelegates(Mailbox mailbox, params UserId[] userIds)

Parameters

mailbox Mailbox

The mailbox to remove delegates from.

userIds UserId[]

The Ids of the delegate users to remove.

Returns

Collection<DelegateUserResponse>

A collection of DelegateUserResponse objects providing the results of the operation.

RemoveDelegates(Mailbox, IEnumerable<UserId>)

Removes delegates on a specific mailbox. Calling this method results in a call to EWS.

public Collection<DelegateUserResponse> RemoveDelegates(Mailbox mailbox, IEnumerable<UserId> userIds)

Parameters

mailbox Mailbox

The mailbox to remove delegates from.

userIds IEnumerable<UserId>

The Ids of the delegate users to remove.

Returns

Collection<DelegateUserResponse>

A collection of DelegateUserResponse objects providing the results of the operation.

ResolveName(string)

Finds contacts in the user's Contacts folder and the Global Address List (in that order) that have names that match the one passed as a parameter. Calling this method results in a call to EWS.

public NameResolutionCollection ResolveName(string nameToResolve)

Parameters

nameToResolve string

The name to resolve.

Returns

NameResolutionCollection

A collection of name resolutions whose names match the one passed as a parameter.

ResolveName(string, ResolveNameSearchLocation, bool)

Finds contacts in the Global Address List that have names that match the one passed as a parameter. Calling this method results in a call to EWS.

public NameResolutionCollection ResolveName(string nameToResolve, ResolveNameSearchLocation searchScope, bool returnContactDetails)

Parameters

nameToResolve string

The name to resolve.

searchScope ResolveNameSearchLocation

The scope of the search.

returnContactDetails bool

Indicates whether full contact information should be returned for each of the found contacts.

Returns

NameResolutionCollection

A collection of name resolutions whose names match the one passed as a parameter.

ResolveName(string, ResolveNameSearchLocation, bool, PropertySet)

Finds contacts in the Global Address List that have names that match the one passed as a parameter. Calling this method results in a call to EWS.

public NameResolutionCollection ResolveName(string nameToResolve, ResolveNameSearchLocation searchScope, bool returnContactDetails, PropertySet contactDataPropertySet)

Parameters

nameToResolve string

The name to resolve.

searchScope ResolveNameSearchLocation

The scope of the search.

returnContactDetails bool

Indicates whether full contact information should be returned for each of the found contacts.

contactDataPropertySet PropertySet

Propety set for contact details

Returns

NameResolutionCollection

A collection of name resolutions whose names match the one passed as a parameter.

ResolveName(string, IEnumerable<FolderId>, ResolveNameSearchLocation, bool)

Finds contacts in the Global Address List and/or in specific contact folders that have names that match the one passed as a parameter. Calling this method results in a call to EWS.

public NameResolutionCollection ResolveName(string nameToResolve, IEnumerable<FolderId> parentFolderIds, ResolveNameSearchLocation searchScope, bool returnContactDetails)

Parameters

nameToResolve string

The name to resolve.

parentFolderIds IEnumerable<FolderId>

The Ids of the contact folders in which to look for matching contacts.

searchScope ResolveNameSearchLocation

The scope of the search.

returnContactDetails bool

Indicates whether full contact information should be returned for each of the found contacts.

Returns

NameResolutionCollection

A collection of name resolutions whose names match the one passed as a parameter.

ResolveName(string, IEnumerable<FolderId>, ResolveNameSearchLocation, bool, PropertySet)

Finds contacts in the Global Address List and/or in specific contact folders that have names that match the one passed as a parameter. Calling this method results in a call to EWS.

public NameResolutionCollection ResolveName(string nameToResolve, IEnumerable<FolderId> parentFolderIds, ResolveNameSearchLocation searchScope, bool returnContactDetails, PropertySet contactDataPropertySet)

Parameters

nameToResolve string

The name to resolve.

parentFolderIds IEnumerable<FolderId>

The Ids of the contact folders in which to look for matching contacts.

searchScope ResolveNameSearchLocation

The scope of the search.

returnContactDetails bool

Indicates whether full contact information should be returned for each of the found contacts.

contactDataPropertySet PropertySet

The property set for the contct details

Returns

NameResolutionCollection

A collection of name resolutions whose names match the one passed as a parameter.

SearchMailboxes(SearchMailboxesParameters)

Search mailboxes

public ServiceResponseCollection<SearchMailboxesResponse> SearchMailboxes(SearchMailboxesParameters searchParameters)

Parameters

searchParameters SearchMailboxesParameters

Search mailboxes parameters

Returns

ServiceResponseCollection<SearchMailboxesResponse>

Collection of search mailboxes response object

SearchMailboxes(IEnumerable<MailboxQuery>, SearchResultType)

Search mailboxes

public ServiceResponseCollection<SearchMailboxesResponse> SearchMailboxes(IEnumerable<MailboxQuery> mailboxQueries, SearchResultType resultType)

Parameters

mailboxQueries IEnumerable<MailboxQuery>

Collection of query and mailboxes

resultType SearchResultType

Search result type

Returns

ServiceResponseCollection<SearchMailboxesResponse>

Collection of search mailboxes response object

SearchMailboxes(IEnumerable<MailboxQuery>, SearchResultType, string, SortDirection, int, SearchPageDirection, string)

Search mailboxes

public ServiceResponseCollection<SearchMailboxesResponse> SearchMailboxes(IEnumerable<MailboxQuery> mailboxQueries, SearchResultType resultType, string sortByProperty, SortDirection sortOrder, int pageSize, SearchPageDirection pageDirection, string pageItemReference)

Parameters

mailboxQueries IEnumerable<MailboxQuery>

Collection of query and mailboxes

resultType SearchResultType

Search result type

sortByProperty string

Sort by property name

sortOrder SortDirection

Sort order

pageSize int

Page size

pageDirection SearchPageDirection

Page navigation direction

pageItemReference string

Item reference used for paging

Returns

ServiceResponseCollection<SearchMailboxesResponse>

Collection of search mailboxes response object

SetClientExtension(List<SetClientExtensionAction>)

Set the client extension data. This method is used in server-to-server calls to install/uninstall/configure ORG extensions to support admin's management of ORG extensions via powershell/UMC.

public void SetClientExtension(List<SetClientExtensionAction> actions)

Parameters

actions List<SetClientExtensionAction>

List of actions to execute.

SetEncryptionConfiguration(string, string, string, string)

Set the encryption configuration data. This method is used in server-to-server calls to set encryption configuration

public void SetEncryptionConfiguration(string imageBase64, string emailText, string portalText, string disclaimerText)

Parameters

imageBase64 string

The base64 encoding of the image

emailText string

The email text

portalText string

The portal text

disclaimerText string

The disclaimer text

SetFlagStatusForItemsInConversations(IEnumerable<KeyValuePair<ConversationId, DateTime?>>, FolderId, Flag)

Sets flag status for items in conversation. Calling this method would result in call to EWS.

public ServiceResponseCollection<ServiceResponse> SetFlagStatusForItemsInConversations(IEnumerable<KeyValuePair<ConversationId, DateTime?>> idLastSyncTimePairs, FolderId contextFolderId, Flag flagStatus)

Parameters

idLastSyncTimePairs IEnumerable<KeyValuePair<ConversationId, DateTime?>>

The pairs of Id of conversation whose items should have their read state set and the date and time conversation was last synced (Items received after that date will not have their read state set).

contextFolderId FolderId

The Id of the folder that contains the conversation.

flagStatus Flag

Flag status to apply to conversation items.

Returns

ServiceResponseCollection<ServiceResponse>

SetHoldOnMailboxes(SetHoldOnMailboxesParameters)

Set hold on mailboxes

public SetHoldOnMailboxesResponse SetHoldOnMailboxes(SetHoldOnMailboxesParameters parameters)

Parameters

parameters SetHoldOnMailboxesParameters

Set hold parameters

Returns

SetHoldOnMailboxesResponse

Service response object

SetHoldOnMailboxes(string, HoldAction, string, string)

Set hold on mailboxes

public SetHoldOnMailboxesResponse SetHoldOnMailboxes(string holdId, HoldAction actionType, string query, string inPlaceHoldIdentity)

Parameters

holdId string

Hold id

actionType HoldAction

Action type

query string

Query string

inPlaceHoldIdentity string

in-place hold identity

Returns

SetHoldOnMailboxesResponse

Service response object

SetHoldOnMailboxes(string, HoldAction, string, string, string)

Set hold on mailboxes

public SetHoldOnMailboxesResponse SetHoldOnMailboxes(string holdId, HoldAction actionType, string query, string inPlaceHoldIdentity, string itemHoldPeriod)

Parameters

holdId string

Hold id

actionType HoldAction

Action type

query string

Query string

inPlaceHoldIdentity string

in-place hold identity

itemHoldPeriod string

item hold period

Returns

SetHoldOnMailboxesResponse

Service response object

SetHoldOnMailboxes(string, HoldAction, string, string[])

Set hold on mailboxes

public SetHoldOnMailboxesResponse SetHoldOnMailboxes(string holdId, HoldAction actionType, string query, string[] mailboxes)

Parameters

holdId string

Hold id

actionType HoldAction

Action type

query string

Query string

mailboxes string[]

Collection of mailboxes

Returns

SetHoldOnMailboxesResponse

Service response object

SetReadStateForItemsInConversations(IEnumerable<KeyValuePair<ConversationId, DateTime?>>, FolderId, bool)

Sets the read state for items in conversation. Calling this method would result in call to EWS.

public ServiceResponseCollection<ServiceResponse> SetReadStateForItemsInConversations(IEnumerable<KeyValuePair<ConversationId, DateTime?>> idLastSyncTimePairs, FolderId contextFolderId, bool isRead)

Parameters

idLastSyncTimePairs IEnumerable<KeyValuePair<ConversationId, DateTime?>>

The pairs of Id of conversation whose items should have their read state set and the date and time conversation was last synced (Items received after that date will not have their read state set).

contextFolderId FolderId

The Id of the folder that contains the conversation.

isRead bool

if set to true, conversation items are marked as read; otherwise they are marked as unread.

Returns

ServiceResponseCollection<ServiceResponse>

SetReadStateForItemsInConversations(IEnumerable<KeyValuePair<ConversationId, DateTime?>>, FolderId, bool, bool)

Sets the read state for items in conversation. Calling this method would result in call to EWS.

public ServiceResponseCollection<ServiceResponse> SetReadStateForItemsInConversations(IEnumerable<KeyValuePair<ConversationId, DateTime?>> idLastSyncTimePairs, FolderId contextFolderId, bool isRead, bool suppressReadReceipts)

Parameters

idLastSyncTimePairs IEnumerable<KeyValuePair<ConversationId, DateTime?>>

The pairs of Id of conversation whose items should have their read state set and the date and time conversation was last synced (Items received after that date will not have their read state set).

contextFolderId FolderId

The Id of the folder that contains the conversation.

isRead bool

if set to true, conversation items are marked as read; otherwise they are marked as unread.

suppressReadReceipts bool

if set to true read receipts are suppressed.

Returns

ServiceResponseCollection<ServiceResponse>

SetRetentionPolicyForItemsInConversations(IEnumerable<KeyValuePair<ConversationId, DateTime?>>, FolderId, RetentionType, Guid?)

Sets the retention policy for items in conversation. Calling this method would result in call to EWS.

public ServiceResponseCollection<ServiceResponse> SetRetentionPolicyForItemsInConversations(IEnumerable<KeyValuePair<ConversationId, DateTime?>> idLastSyncTimePairs, FolderId contextFolderId, RetentionType retentionPolicyType, Guid? retentionPolicyTagId)

Parameters

idLastSyncTimePairs IEnumerable<KeyValuePair<ConversationId, DateTime?>>

The pairs of Id of conversation whose items should have their retention policy set and the date and time conversation was last synced (Items received after that date will not have their retention policy set).

contextFolderId FolderId

The Id of the folder that contains the conversation.

retentionPolicyType RetentionType

Retention policy type.

retentionPolicyTagId Guid?

Retention policy tag id. Null will clear the policy.

Returns

ServiceResponseCollection<ServiceResponse>

SetTeamMailbox(EmailAddress, Uri, TeamMailboxLifecycleState)

Set a TeamMailbox

public void SetTeamMailbox(EmailAddress emailAddress, Uri sharePointSiteUrl, TeamMailboxLifecycleState state)

Parameters

emailAddress EmailAddress

TeamMailbox email address

sharePointSiteUrl Uri

SharePoint site URL

state TeamMailboxLifecycleState

TeamMailbox lifecycle state

SetUserOofSettings(string, OofSettings)

Sets the Out of Office (OOF) settings for a specific mailbox. Calling this method results in a call to EWS.

public void SetUserOofSettings(string smtpAddress, OofSettings oofSettings)

Parameters

smtpAddress string

The SMTP address of the user for which to set OOF settings.

oofSettings OofSettings

The OOF settings.

SubscribeToPullNotifications(IEnumerable<FolderId>, int, string, params EventType[])

Subscribes to pull notifications. Calling this method results in a call to EWS.

public PullSubscription SubscribeToPullNotifications(IEnumerable<FolderId> folderIds, int timeout, string watermark, params EventType[] eventTypes)

Parameters

folderIds IEnumerable<FolderId>

The Ids of the folder to subscribe to.

timeout int

The timeout, in minutes, after which the subscription expires. Timeout must be between 1 and 1440.

watermark string

An optional watermark representing a previously opened subscription.

eventTypes EventType[]

The event types to subscribe to.

Returns

PullSubscription

A PullSubscription representing the new subscription.

SubscribeToPullNotificationsOnAllFolders(int, string, params EventType[])

Subscribes to pull notifications on all folders in the authenticated user's mailbox. Calling this method results in a call to EWS.

public PullSubscription SubscribeToPullNotificationsOnAllFolders(int timeout, string watermark, params EventType[] eventTypes)

Parameters

timeout int

The timeout, in minutes, after which the subscription expires. Timeout must be between 1 and 1440.

watermark string

An optional watermark representing a previously opened subscription.

eventTypes EventType[]

The event types to subscribe to.

Returns

PullSubscription

A PullSubscription representing the new subscription.

SubscribeToPushNotifications(IEnumerable<FolderId>, Uri, int, string, params EventType[])

Subscribes to push notifications. Calling this method results in a call to EWS.

public PushSubscription SubscribeToPushNotifications(IEnumerable<FolderId> folderIds, Uri url, int frequency, string watermark, params EventType[] eventTypes)

Parameters

folderIds IEnumerable<FolderId>

The Ids of the folder to subscribe to.

url Uri

The URL of the Web Service endpoint the Exchange server should push events to.

frequency int

The frequency, in minutes, at which the Exchange server should contact the Web Service endpoint. Frequency must be between 1 and 1440.

watermark string

An optional watermark representing a previously opened subscription.

eventTypes EventType[]

The event types to subscribe to.

Returns

PushSubscription

A PushSubscription representing the new subscription.

SubscribeToPushNotifications(IEnumerable<FolderId>, Uri, int, string, string, params EventType[])

Subscribes to push notifications. Calling this method results in a call to EWS.

public PushSubscription SubscribeToPushNotifications(IEnumerable<FolderId> folderIds, Uri url, int frequency, string watermark, string callerData, params EventType[] eventTypes)

Parameters

folderIds IEnumerable<FolderId>

The Ids of the folder to subscribe to.

url Uri

The URL of the Web Service endpoint the Exchange server should push events to.

frequency int

The frequency, in minutes, at which the Exchange server should contact the Web Service endpoint. Frequency must be between 1 and 1440.

watermark string

An optional watermark representing a previously opened subscription.

callerData string

Optional caller data that will be returned the call back.

eventTypes EventType[]

The event types to subscribe to.

Returns

PushSubscription

A PushSubscription representing the new subscription.

SubscribeToPushNotificationsOnAllFolders(Uri, int, string, params EventType[])

Subscribes to push notifications on all folders in the authenticated user's mailbox. Calling this method results in a call to EWS.

public PushSubscription SubscribeToPushNotificationsOnAllFolders(Uri url, int frequency, string watermark, params EventType[] eventTypes)

Parameters

url Uri

The URL of the Web Service endpoint the Exchange server should push events to.

frequency int

The frequency, in minutes, at which the Exchange server should contact the Web Service endpoint. Frequency must be between 1 and 1440.

watermark string

An optional watermark representing a previously opened subscription.

eventTypes EventType[]

The event types to subscribe to.

Returns

PushSubscription

A PushSubscription representing the new subscription.

SubscribeToPushNotificationsOnAllFolders(Uri, int, string, string, params EventType[])

Subscribes to push notifications on all folders in the authenticated user's mailbox. Calling this method results in a call to EWS.

public PushSubscription SubscribeToPushNotificationsOnAllFolders(Uri url, int frequency, string watermark, string callerData, params EventType[] eventTypes)

Parameters

url Uri

The URL of the Web Service endpoint the Exchange server should push events to.

frequency int

The frequency, in minutes, at which the Exchange server should contact the Web Service endpoint. Frequency must be between 1 and 1440.

watermark string

An optional watermark representing a previously opened subscription.

callerData string

Optional caller data that will be returned the call back.

eventTypes EventType[]

The event types to subscribe to.

Returns

PushSubscription

A PushSubscription representing the new subscription.

SubscribeToStreamingNotifications(IEnumerable<FolderId>, params EventType[])

Subscribes to streaming notifications. Calling this method results in a call to EWS.

public StreamingSubscription SubscribeToStreamingNotifications(IEnumerable<FolderId> folderIds, params EventType[] eventTypes)

Parameters

folderIds IEnumerable<FolderId>

The Ids of the folder to subscribe to.

eventTypes EventType[]

The event types to subscribe to.

Returns

StreamingSubscription

A StreamingSubscription representing the new subscription.

SubscribeToStreamingNotificationsOnAllFolders(params EventType[])

Subscribes to streaming notifications on all folders in the authenticated user's mailbox. Calling this method results in a call to EWS.

public StreamingSubscription SubscribeToStreamingNotificationsOnAllFolders(params EventType[] eventTypes)

Parameters

eventTypes EventType[]

The event types to subscribe to.

Returns

StreamingSubscription

A StreamingSubscription representing the new subscription.

SyncFolderHierarchy(FolderId, PropertySet, string)

Synchronizes the sub-folders of a specific folder. Calling this method results in a call to EWS.

public ChangeCollection<FolderChange> SyncFolderHierarchy(FolderId syncFolderId, PropertySet propertySet, string syncState)

Parameters

syncFolderId FolderId

The Id of the folder containing the items to synchronize with. A null value indicates the root folder of the mailbox.

propertySet PropertySet

The set of properties to retrieve for synchronized items.

syncState string

The optional sync state representing the point in time when to start the synchronization.

Returns

ChangeCollection<FolderChange>

A ChangeCollection containing a list of changes that occurred in the specified folder.

SyncFolderHierarchy(PropertySet, string)

Synchronizes the entire folder hierarchy of the mailbox this Service is connected to. Calling this method results in a call to EWS.

public ChangeCollection<FolderChange> SyncFolderHierarchy(PropertySet propertySet, string syncState)

Parameters

propertySet PropertySet

The set of properties to retrieve for synchronized items.

syncState string

The optional sync state representing the point in time when to start the synchronization.

Returns

ChangeCollection<FolderChange>

A ChangeCollection containing a list of changes that occurred in the specified folder.

SyncFolderItems(FolderId, PropertySet, IEnumerable<ItemId>, int, SyncFolderItemsScope, string)

Synchronizes the items of a specific folder. Calling this method results in a call to EWS.

public ChangeCollection<ItemChange> SyncFolderItems(FolderId syncFolderId, PropertySet propertySet, IEnumerable<ItemId> ignoredItemIds, int maxChangesReturned, SyncFolderItemsScope syncScope, string syncState)

Parameters

syncFolderId FolderId

The Id of the folder containing the items to synchronize with.

propertySet PropertySet

The set of properties to retrieve for synchronized items.

ignoredItemIds IEnumerable<ItemId>

The optional list of item Ids that should be ignored.

maxChangesReturned int

The maximum number of changes that should be returned.

syncScope SyncFolderItemsScope

The sync scope identifying items to include in the ChangeCollection.

syncState string

The optional sync state representing the point in time when to start the synchronization.

Returns

ChangeCollection<ItemChange>

A ChangeCollection containing a list of changes that occurred in the specified folder.

UninstallApp(string)

Uninstall app.

public void UninstallApp(string id)

Parameters

id string

App ID

Remarks

Exception will be thrown for errors.

UnpinTeamMailbox(EmailAddress)

Unpin a TeamMailbox

public void UnpinTeamMailbox(EmailAddress emailAddress)

Parameters

emailAddress EmailAddress

TeamMailbox email address

UpdateDelegates(Mailbox, MeetingRequestsDeliveryScope?, params DelegateUser[])

Updates delegates on a specific mailbox. Calling this method results in a call to EWS.

public Collection<DelegateUserResponse> UpdateDelegates(Mailbox mailbox, MeetingRequestsDeliveryScope? meetingRequestsDeliveryScope, params DelegateUser[] delegateUsers)

Parameters

mailbox Mailbox

The mailbox to update delegates on.

meetingRequestsDeliveryScope MeetingRequestsDeliveryScope?

Indicates how meeting requests should be sent to delegates.

delegateUsers DelegateUser[]

The delegate users to update.

Returns

Collection<DelegateUserResponse>

A collection of DelegateUserResponse objects providing the results of the operation.

UpdateDelegates(Mailbox, MeetingRequestsDeliveryScope?, IEnumerable<DelegateUser>)

Updates delegates on a specific mailbox. Calling this method results in a call to EWS.

public Collection<DelegateUserResponse> UpdateDelegates(Mailbox mailbox, MeetingRequestsDeliveryScope? meetingRequestsDeliveryScope, IEnumerable<DelegateUser> delegateUsers)

Parameters

mailbox Mailbox

The mailbox to update delegates on.

meetingRequestsDeliveryScope MeetingRequestsDeliveryScope?

Indicates how meeting requests should be sent to delegates.

delegateUsers IEnumerable<DelegateUser>

The delegate users to update.

Returns

Collection<DelegateUserResponse>

A collection of DelegateUserResponse objects providing the results of the operation.

UpdateInboxRules(IEnumerable<RuleOperation>, bool)

Updates the authenticated user's inbox rules by applying the specified operations.

public void UpdateInboxRules(IEnumerable<RuleOperation> operations, bool removeOutlookRuleBlob)

Parameters

operations IEnumerable<RuleOperation>

The operations that should be applied to the user's inbox rules.

removeOutlookRuleBlob bool

Indicate whether or not to remove Outlook Rule Blob.

UpdateInboxRules(IEnumerable<RuleOperation>, bool, string)

Update the specified user's inbox rules by applying the specified operations.

public void UpdateInboxRules(IEnumerable<RuleOperation> operations, bool removeOutlookRuleBlob, string mailboxSmtpAddress)

Parameters

operations IEnumerable<RuleOperation>

The operations that should be applied to the user's inbox rules.

removeOutlookRuleBlob bool

Indicate whether or not to remove Outlook Rule Blob.

mailboxSmtpAddress string

The SMTP address of the user whose inbox rules should be updated.

UpdateItems(IEnumerable<Item>, FolderId, ConflictResolutionMode, MessageDisposition?, SendInvitationsOrCancellationsMode?)

Updates multiple items in a single EWS call. UpdateItems does not support items that have unsaved attachments.

public ServiceResponseCollection<UpdateItemResponse> UpdateItems(IEnumerable<Item> items, FolderId savedItemsDestinationFolderId, ConflictResolutionMode conflictResolution, MessageDisposition? messageDisposition, SendInvitationsOrCancellationsMode? sendInvitationsOrCancellationsMode)

Parameters

items IEnumerable<Item>

The items to update.

savedItemsDestinationFolderId FolderId

The folder in which to save sent messages, meeting invitations or cancellations. If null, the messages, meeting invitation or cancellations are saved in the Sent Items folder.

conflictResolution ConflictResolutionMode

The conflict resolution mode.

messageDisposition MessageDisposition?

Indicates the disposition mode for items of type EmailMessage. Required if items contains at least one EmailMessage instance.

sendInvitationsOrCancellationsMode SendInvitationsOrCancellationsMode?

Indicates if and how invitations and/or cancellations should be sent for items of type Appointment. Required if items contains at least one Appointment instance.

Returns

ServiceResponseCollection<UpdateItemResponse>

A ServiceResponseCollection providing update results for each of the specified items.

UpdateItems(IEnumerable<Item>, FolderId, ConflictResolutionMode, MessageDisposition?, SendInvitationsOrCancellationsMode?, bool)

Updates multiple items in a single EWS call. UpdateItems does not support items that have unsaved attachments.

public ServiceResponseCollection<UpdateItemResponse> UpdateItems(IEnumerable<Item> items, FolderId savedItemsDestinationFolderId, ConflictResolutionMode conflictResolution, MessageDisposition? messageDisposition, SendInvitationsOrCancellationsMode? sendInvitationsOrCancellationsMode, bool suppressReadReceipts)

Parameters

items IEnumerable<Item>

The items to update.

savedItemsDestinationFolderId FolderId

The folder in which to save sent messages, meeting invitations or cancellations. If null, the messages, meeting invitation or cancellations are saved in the Sent Items folder.

conflictResolution ConflictResolutionMode

The conflict resolution mode.

messageDisposition MessageDisposition?

Indicates the disposition mode for items of type EmailMessage. Required if items contains at least one EmailMessage instance.

sendInvitationsOrCancellationsMode SendInvitationsOrCancellationsMode?

Indicates if and how invitations and/or cancellations should be sent for items of type Appointment. Required if items contains at least one Appointment instance.

suppressReadReceipts bool

Whether to suppress read receipts

Returns

ServiceResponseCollection<UpdateItemResponse>

A ServiceResponseCollection providing update results for each of the specified items.