web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

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

(0) ShareShare
ReportReport
Posted on by 355

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=myorgname.crm.dynamics.com; Username=me@mydomain.com; 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.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Aric Levin - MVP Profile Picture
    30,190 Moderator on at
    RE: Can't connect to Dynamics 365 with Xrm.Tooling.Connector after 365 update

    Can you check that you are using the correct version of the SDK? I am not sure if that is the cause of your problem, but it is worth checking it out. Replace the CRM dll files, with the new files in the 8.2 SDK.

  • JohnLeme Profile Picture
    355 on at
    RE: Can't connect to Dynamics 365 with Xrm.Tooling.Connector after 365 update

    I have the latest SDK with 8.2 on the bin folder BUT the sample project on it, that I was debugging, has the 8.0.. Thanks for making me double check.

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Can't connect to Dynamics 365 with Xrm.Tooling.Connector after 365 update

    Unable to Login to Dynamics CRMOrganizationServiceProxy is nullOrganizationServiceProxy is null OrganizationServiceProxy is null

     

    Took Over a Month to Figure It Out: Unable to Connect to CRM After Upgrade. The Reason is that SecurityProtocolType.Tls12 Must Be Provided Before Calling XRM Underlying Code. This is due to Changes to the .NET Framework and the Fact that XRM Tooling somehow uses telemetry.

    Using XRM Tooling to Connect to Dynamics CRM 365 - Online, Once You Upgrade From Earlier (Pre 8.x), You Will Get This Error

    Error Title:
    Unable to Login to Dynamics CRMOrganizationServiceProxy is nullOrganizationServiceProxy is null OrganizationServiceProxy is null

    Root Cause:
    (TLS 1.2 is NOT negotiated in .NET 4.7 without explicit ServicePointManager.SecurityProtocol call)

    I Found the Fix to Be As Follows (Thanks to Microsoft Brightest Mrs. - Swarnavalli  Microsoft 365 Development Team):

    LastCrmError = "Unable to Login to Dynamics CRMOrganizationServiceProxy is nullOrganizationServiceProxy is null OrganizationServiceProxy is null"

    XRM_2D00_NotAbleToConnect_2D00_01_2D00_03_2D00_2018.png

    1. Fix Step 1 - Get Nuget Packages for Verion 9.0 of the Dynamics CRM From This Location

    www.nuget.org/.../Microsoft.CrmSdk.XrmTooling.CoreAss 
    embly/

    Install the Nuget Package(PM > Install-Package Microsoft.CrmSdk.XrmTooling.CoreAssembly -Version 9.0.0.7)

    2. Fix Step 2 - Clean Up All Your Visual Studio Development Not to Use Older Versions of CRM SDK (Use .NET Framework 4.6x or 4.7). Add required XRM Dlls Back for Newest Version - V9 for Me Now)

    3. Fix Step 3 - Specify Protocol Right Before You Make Calls TO XRM Tooling DLL. Add a Line to Your C# or Dot Net Code.

    ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

    Add (ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;) Somewhere in your Project. As Proof of Concept, Add It Before You Call the Connect to CRM Constructor

    m_CrmServiceClient = new CrmServiceClient(LoginUserName, CrmServiceClient.MakeSecureString(LoginPassword), OrganizationRegionName, OrganizationName, useUniqueInstance, useSsl, orgDetail, isOffice365);

    This Has Taken Near 1 Month to Figure It Out. With Many Many Calls to Microsoft (Thanks Largely to Microsoft Brightest Mrs. - Swarnavalli  Microsoft 365 Development Team)

    Bashar Sadig

  • kyleknab Profile Picture
    517 on at
    RE: Can't connect to Dynamics 365 with Xrm.Tooling.Connector after 365 update

    Thanks Bashar, this TLS adjustment worked for me. For anyone reading this in the future... ServicePointManager is in the System.Net library... if your code isn't 'using' that, you can alter Bashar's line to be fully qualified:

    System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#2
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans