Hi Members,
Can someone advise what I am missing in my code here in C#. But unable to connect to CRM. I am currently trying to configure this connectivity in my local environment.
string userName = "domain1\\user1";
string password = "test123";
string orgName = "hypernation.crm365.com/.../Organization.svc";
string internalurl = "hypernation.crm365.com";
NetworkCredential creds = new NetworkCredential(userName, CrmServiceClient.MakeSecureString(password));
Microsoft.Xrm.Tooling.Connector.AuthenticationType authType = Microsoft.Xrm.Tooling.Connector.AuthenticationType.AD;
CrmServiceClient conn = new CrmServiceClient(creds, authType, internalurl, "443", orgName, true, true, null);
I tried using connection string but no luck at all.
<add name="crm"
connectionString="AuthType=AD;Url=hypernation.crm365.com/.../Organization.svc; Domain=domain1; Username=domain1\user1; Password=test123;"/>
Here above is there any other alternative to configure connection string?
My main motive is to use the flag "RequireNewInstance=true". but can't seem to use it without CrmServiceClient instance.
I am able to connect to CRM using OrganizationServiceProxy class and can access entities fluently.
Thank you.
*This post is locked for comments