Skip to main content

Notifications

Announcements

No record found.

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

  • kyleknab Profile Picture
    kyleknab 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;

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee 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

  • JohnLeme Profile Picture
    JohnLeme 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.

  • Verified answer
    Aric Levin Profile Picture
    Aric Levin 30,188 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.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans