Search code examples
biztalkdynamics-crm-onlinebiztalk-2013r2

WCF-WebHttp Send Port authenticating to Dynamics CRM fails


I'm trying to configure a WCF-WebHttp send port for accessing the Dynamics CRM OData REST WebAPI but I hit a road block getting the authentication behavior to work.

Configuring the endpoint Url, credentials and transport security the send port fails to process messages with the error

System.IO.IOException: Authentication failed because the remote party has closed the transport stream.

Following BizTalk 2013 to CRM 2011 Integration I tried to use the ClientCredential endpoint behavior but the problem stays the same.

I am aware that the problem is to retrieve the authentication token but I have not found any way to create an endpoint behavior being able to handle this.

I have a working WCF-Custom SP targeting the SOAP endpoint but I couldn't find any trace of the schema usually provided as part of the CRM SDK in v9.0.2.4 so I figured Microsoft is gently nudging us towards the new REST Web API instead.


Solution

  • The latest version of Dynamics CRM requires TLS 1.2 as per Microsoft Dynamics 365 Customer Engagement (online) to require TLS 1.2 for connectivity

    To enable that you either