I am trying to authenticate my application with a certificate to on premise Dynamics(Customer Engagement) v9.0.9 with the constructor below but it keeps returning null with no useful errors except "Unable to Login to Dynamics"
The user that the client certificate relates to, is a valid Dynamics System User and my app will connect when using Username and Password via NetworkCredential.
X509Certificate2 certificate = getCertificate();
CrmServiceClient crmServiceClient = new CrmServiceClient(certificate, StoreName.Root, "", new Uri("http://something.com"), "", false, false, null, , new Uri("http://something.com"), "C://t")
IOrganizationService m_OrgServ = (IOrganizationService)crmServiceClient.OrganizationWebProxyClient != null ?
(IOrganizationService)crmServiceClient.OrganizationServiceProxy;
I have also tried getting the values from a connectionString which is set within the app.config
string connectionString = ConfigurationManager.ConnectionStrings[1].ConnectionString
CrmServiceClient crmServiceClient = new CrmServiceClient(certificateString)
There are no working examples using the x509Certificate to connect to Dynamics on-prem in the documentation and struggling to find any other resources.
Any ideas?

Report
All responses (
Answers (