Class AutodiscoverService
- Namespace
- Microsoft.Exchange.WebServices.Autodiscover
- Assembly
- Microsoft.Exchange.WebServices.dll
Represents a binding to the Exchange Autodiscover Service.
public sealed class AutodiscoverService : ExchangeServiceBase- Inheritance
- 
      
      
      AutodiscoverService
- Inherited Members
Constructors
AutodiscoverService()
Initializes a new instance of the AutodiscoverService class.
public AutodiscoverService()AutodiscoverService(ExchangeVersion)
Initializes a new instance of the AutodiscoverService class.
public AutodiscoverService(ExchangeVersion requestedServerVersion)Parameters
- requestedServerVersionExchangeVersion
- The requested server version. 
AutodiscoverService(string)
Initializes a new instance of the AutodiscoverService class.
public AutodiscoverService(string domain)Parameters
- domainstring
- The domain that will be used to determine the URL of the service. 
AutodiscoverService(string, ExchangeVersion)
Initializes a new instance of the AutodiscoverService class.
public AutodiscoverService(string domain, ExchangeVersion requestedServerVersion)Parameters
- domainstring
- The domain that will be used to determine the URL of the service. 
- requestedServerVersionExchangeVersion
- The requested server version. 
AutodiscoverService(Uri)
Initializes a new instance of the AutodiscoverService class.
public AutodiscoverService(Uri url)Parameters
- urlUri
- The URL of the service. 
AutodiscoverService(Uri, ExchangeVersion)
Initializes a new instance of the AutodiscoverService class.
public AutodiscoverService(Uri url, ExchangeVersion requestedServerVersion)Parameters
- urlUri
- The URL of the service. 
- requestedServerVersionExchangeVersion
- The requested server version. 
Properties
Domain
Gets or sets the domain this service is bound to. When this property is set, the domain name is used to automatically determine the Autodiscover service URL.
public string Domain { get; set; }Property Value
EnableScpLookup
Gets or sets a value indicating whether the AutodiscoverService should perform SCP (ServiceConnectionPoint) record lookup when determining the Autodiscover service URL.
public bool EnableScpLookup { get; set; }Property Value
GetScpUrlsForDomainCallback
Gets or sets the delegate used to resolve Autodiscover SCP urls for a specified domain.
public Func<string, ICollection<string>> GetScpUrlsForDomainCallback { get; set; }Property Value
IsExternal
Gets a value indicating whether the Autodiscover service that URL points to is internal (inside the corporate network) or external (outside the corporate network).
public bool? IsExternal { get; }Property Value
- bool?
Remarks
IsExternal is null in the following cases:
- This instance has been created with a domain name and no method has been called,
- This instance has been created with a URL.
RedirectionUrlValidationCallback
Gets or sets the redirection URL validation callback.
public AutodiscoverRedirectionUrlValidationCallback RedirectionUrlValidationCallback { get; set; }Property Value
- AutodiscoverRedirectionUrlValidationCallback
- The redirection URL validation callback. 
Url
Gets or sets the URL this service is bound to.
public Uri Url { get; set; }Property Value
- Uri
Methods
GetDomainSettings(IEnumerable<string>, ExchangeVersion?, params DomainSettingName[])
Retrieves the specified settings for a set of domains.
public GetDomainSettingsResponseCollection GetDomainSettings(IEnumerable<string> domains, ExchangeVersion? requestedVersion, params DomainSettingName[] domainSettingNames)Parameters
- domainsIEnumerable<string>
- The SMTP addresses of the domains. 
- requestedVersionExchangeVersion?
- Requested version of the Exchange service. 
- domainSettingNamesDomainSettingName[]
- The domain setting names. 
Returns
- GetDomainSettingsResponseCollection
- A GetDomainSettingsResponseCollection object containing the responses for each individual domain. 
GetDomainSettings(string, ExchangeVersion?, params DomainSettingName[])
Retrieves the specified settings for a domain.
public GetDomainSettingsResponse GetDomainSettings(string domain, ExchangeVersion? requestedVersion, params DomainSettingName[] domainSettingNames)Parameters
- domainstring
- The domain. 
- requestedVersionExchangeVersion?
- Requested version of the Exchange service. 
- domainSettingNamesDomainSettingName[]
- The domain setting names. 
Returns
- GetDomainSettingsResponse
- A DomainResponse object containing the requested settings for the specified domain. 
GetUserSettings(string, params UserSettingName[])
Retrieves the specified settings for single SMTP address.
public GetUserSettingsResponse GetUserSettings(string userSmtpAddress, params UserSettingName[] userSettingNames)Parameters
- userSmtpAddressstring
- The SMTP addresses of the user. 
- userSettingNamesUserSettingName[]
- The user setting names. 
Returns
- GetUserSettingsResponse
- A UserResponse object containing the requested settings for the specified user. 
Remarks
This method handles will run the entire Autodiscover "discovery" algorithm and will follow address and URL redirections.
GetUsersSettings(IEnumerable<string>, params UserSettingName[])
Retrieves the specified settings for a set of users.
public GetUserSettingsResponseCollection GetUsersSettings(IEnumerable<string> userSmtpAddresses, params UserSettingName[] userSettingNames)Parameters
- userSmtpAddressesIEnumerable<string>
- The SMTP addresses of the users. 
- userSettingNamesUserSettingName[]
- The user setting names. 
Returns
- GetUserSettingsResponseCollection
- A GetUserSettingsResponseCollection object containing the responses for each individual user. 
TryGetPartnerAccess(string, out ExchangeCredentials, out Uri)
Try to get the partner access information for the given target tenant.
public bool TryGetPartnerAccess(string targetTenantDomain, out ExchangeCredentials partnerAccessCredentials, out Uri targetTenantAutodiscoverUrl)Parameters
- targetTenantDomainstring
- The target domain or user email address. 
- partnerAccessCredentialsExchangeCredentials
- The partner access credentials. 
- targetTenantAutodiscoverUrlUri
- The autodiscover url for the given tenant. 
Returns
- bool
- True if the partner access information was retrieved, false otherwise.