Joao Leme
Joao Leme

Reputation: 9888

Can't connect to Dynamics 365 with Xrm.Tooling.Connector after 365 update

Our organization uses Dynamics Online and this weekend received a major update from CRM 2016 (8.1) to 365 (8.2), and since then my apps can't connect using the Xrm.Tooling.Connector:

CrmServiceClient client1 = new CrmServiceClient(ConfigurationManager.ConnectionStrings["XrmPowerString"].ConnectionString);

On app.config I have the connection string

<add name="MyConnectionString" connectionString="Url=https://myorgname.crm.dynamics.com; [email protected]; Password=mypassword; AuthType=Office365" />

I get error:

Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error: 2 : Unable to Login to Dynamics CRM

And also

Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error: 2 : Source : mscorlib Method : HandleReturnMessage Date : 14/08/2017 Time : 01:46:02 Error : An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail.

Upvotes: 1

Views: 3445

Answers (2)

Dimitris Voudrias
Dimitris Voudrias

Reputation: 71

After researhing for a similar problem in dynamics 365 crm 9.0, we found that was caused by Security Protocol Type version.

Before instatiate your connection with CRM, ensure that your protocol version is TLS 1.2, adding the following code: ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

https://community.dynamics.com/crm/f/117/t/235290

Upvotes: 3

Joao Leme
Joao Leme

Reputation: 9888

Make sure you have the latest DLLs (8.2).

If you are working with the sample projects within the SDK (my case), you MUST delete the content of the BIN folder and update all packages because even on the latest SDK, the samples are referring the old dll version 8.0.

Upvotes: 0

Related Questions