Unable to Login to Dynamics CRMOrganizationServiceProxy is null

Dlls Required:
Microsoft.Xrm.Tooling.Connector.dll

CRM connection code:
string connectionString = ConfigurationManager.ConnectionStrings["CRM"].ConnectionString;

CrmServiceClient client = new CrmServiceClient(connectionString);


Connection String:
<add name="CRM" connectionString="AuthType=Office365;Username=myid@mydomain.com; Password=mypassword;Url=https://organiationuniquename.crm.dynamics.com"/>


That’s it, this is the piece of code required to connect CRM online through SDK. But the error "Unable to Login to Dynamics CRMOrganizationServiceProxy is null" sometimes can kill good amount of time. Below are the some suggestion which can resolve and saves someone's hours of time.

1. Check your connection string.
2. You should use unique name of organization in connection string. You can find unique name in              Settings->Customizations->Developer Resources







3. something wrong with credentials you are using. Try using service credentials.
4. Double check which version of dlls you are using.
5. Install the right version of dlls through nuget packages










6. There may something wrong with network, try using different network preferably try to test in client network itself
7.     And, include below tag in app.config or web.config
<system.net>
  <defaultProxy useDefaultCredentials="true"></defaultProxy>
</system.net>

Let me know which point helps you most.

Happy coding.



Featured Post

Improving MS CRM Performance

Performance on MS CRM is always a crucial thing and we may follow different ways to achieve the performance thing. Below is the one more a...