Issue while authenticating with CRM Organization Service from Web App (July 2017 Update)

While connecting through Dynamics 365 Customer Engagement through a web application we were getting OrganizationServiceProxy value as null.

There was nothing out of ordinary in the authentication call

value of conn.OrganizationServiceProxy was null and there was no specific exception thrown by the code.


While checking connection object only exception we saw was for LastCrmError object

LastCrmError    “Unable to Login to Dynamics CRMOrganizationServiceProxy is null”  


To resolve the issue we tried to change the authentication code to

and got exception

Metadata contains a reference that cannot be resolved: ‘https://***


While hunting for possible cause we came across Microsoft blog post stating that they have changed the connectivity to utilize TLS 1.2. (Default version used by .Net framework is SSL3 | TLS).

To enforce TLS 1.2 we included

just before connection request being sent to CRM. Tesolved issue in both authentication methods.

Leave a Reply

Your email address will not be published. Required fields are marked *