Hi,
I am trying to connect to Dynamics CRM Online via a console application. I manged to connect successfully when I use the service account. But if I use any other user I get the following error as the last CRM error in conn object; so the orgService is null: (these users can login to CRM and do their work.)
Unable to Login to Dynamics CRMOrganizationWebProxyClient is nullOrganizationServiceProxy is nullOrganizationServiceProxy is nullOrganizationServiceProxy is nullOrganizationWebProxyClient is nullOrganizationServiceProxy is nullOrganizationWebProxyClient is nullOrganizationServiceProxy is null
Here is my code:
private static string connectionString = "Url=orgname.crm6.dynamics.com; Username=username@example.com; Password=password; authtype=Office365"; ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; CrmServiceClient conn = new Microsoft.Xrm.Tooling.Connector.CrmServiceClient(connectionString); IOrganizationService orgService = (IOrganizationService)conn.OrganizationWebProxyClient != null ? (IOrganizationService)conn.OrganizationWebProxyClient : (IOrganizationService)conn.OrganizationServiceProxy;
I have tried using the organization unique name instead of org name in the connection string as suggested here:
http://missdynamicscrm.blogspot.in/2017/02/error-unable-to-login-to-dynamics.html
and also this one:
Nothing works.
*This post is locked for comments