ExchangeServiceBase.UseDefaultCredentials Property

Definition

Gets or sets a value that indicates whether the credentials of the user who is currently logged on to Windows should be used to authenticate with Exchange Web Services (EWS).

public:
 property bool UseDefaultCredentials { bool get(); void set(bool value); };
public bool UseDefaultCredentials { get; set; }
Public Property UseDefaultCredentials As Boolean

Property Value

true if the credentials of the currently logged-on user should be used; otherwise, false.

Remarks

Setting the UseDefaultCredentials property to true automatically sets the Credentials property to a null reference (Nothing in Visual Basic).

You cannot use the default credentials of the logged on user if the user’s mailbox is hosted in Exchange Online or Exchange Online as part of Office 365. Instead, use the Credentials property to set the user’s credentials. The user’s credentials must be in user principal name (UPN) form for Exchange Online.

Applies to