CrmServiceClient Constructor (NetworkCredential, AuthenticationType, String, String, String, Boolean, Boolean, OrganizationDetail)


Updated: November 29, 2016

Applies To: Dynamics 365 (online), Dynamics 365 (on-premises), Dynamics CRM 2016, Dynamics CRM Online

Initializes a new instance of the CrmServiceClient class using the specified network credentials and authentication type as AD or IFD

Namespace:   Microsoft.Xrm.Tooling.Connector
Assembly:  Microsoft.Xrm.Tooling.Connector (in Microsoft.Xrm.Tooling.Connector.dll)

public CrmServiceClient(
	NetworkCredential credential,
	AuthenticationType authType,
	string hostName,
	string port,
	string orgName,
	bool useUniqueInstance = false,
	bool useSsl = false,
	OrganizationDetail orgDetail = null


Type: System.Net.NetworkCredential

Initialized network credential object to sign in to Microsoft Dynamics CRM.

Type: Microsoft.Xrm.Tooling.Connector.AuthenticationType

Authentication type requested. Supported values are: AD or IFD.

Type: System.String

Name of the server that hosts the Microsoft Dynamics CRM web or discovery service.

Type: System.String

Port number on the server that hosts the Microsoft Dynamics CRM web or discovery service (usually 5555).

Type: System.String

Organization name that you want to connect to.

Type: System.Boolean

Optional. Indicates whether to reuse an existing connection, if recalled while the connection is still active. Default is false. If set to true, will force the system to create a unique connection.

Type: Microsoft.Xrm.Sdk.Discovery.OrganizationDetail

Optional. Defaults to null. If set, this is returned from a query to the Discovery service, and is generally used as the second leg of an organization selection process.

Type: System.Boolean

Optional. Indicates whether to use SSL to connect to Microsoft Dynamics CRM. Defaults to false, that is, uses http://. If set to true, uses https://.

Return to top

Microsoft Dynamics 365

© 2016 Microsoft. All rights reserved. Copyright