CrmServiceClient Constructor (String, SecureString, String, String, String, String, String, Boolean, Boolean, OrganizationDetail)
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 claims-based authentication.
Namespace: Microsoft.Xrm.Tooling.Connector
Assembly: Microsoft.Xrm.Tooling.Connector (in Microsoft.Xrm.Tooling.Connector.dll)
Syntax
public CrmServiceClient(
string userId,
SecureString password,
string domain,
string homeRealm,
string hostName,
string port,
string orgName,
bool useUniqueInstance = false,
bool useSsl = false,
OrganizationDetail orgDetail = null
)
Public Sub New (
userId As String,
password As SecureString,
domain As String,
homeRealm As String,
hostName As String,
port As String,
orgName As String,
useUniqueInstance As Boolean,
useSsl As Boolean,
orgDetail As OrganizationDetail
)
Parameters
userId
Type: System.StringUser ID to sign in to CRM.
password
Type: System.Security.SecureStringPassword to sign in to CRM.
domain
Type: System.StringDomain name to use for signing in to CRM.
homeRealm
Type: System.StringHome realm URI of the user.
hostName
Type: System.StringName of the server that hosts the Microsoft Dynamics CRM web or discovery service.
port
Type: System.StringPort number on the server that hosts the Microsoft Dynamics CRM web or discovery service (usually 5555).
orgName
Type: System.StringCRM organization name that you want to connect to.
useUniqueInstance
Type: System.BooleanOptional. 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.
useSsl
Type: System.BooleanOptional. Indicates whether to use SSL to connect to Microsoft Dynamics CRM. Defaults to false, that is, uses http://. If set to true, uses https://.
orgDetail
Type: Microsoft.Xrm.Sdk.Discovery.OrganizationDetailOptional. 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.
See Also
CrmServiceClient Overload
CrmServiceClient Class
Microsoft.Xrm.Tooling.Connector Namespace
Build Windows client applications using the XRM tools
Return to top
Microsoft Dynamics 365
© 2016 Microsoft. All rights reserved. Copyright