Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Error when trying to GET data from HTTPClient in a native application

(0) ShareShare
ReportReport
Posted on by

errorposted02092018.jpg

Able to get Bearer token etc.

Now when I try to call the CRM Web service using HTTPClient Get Async, I get this error:

errorposted02092018_5F004000_.jpg

*This post is locked for comments

  • Suggested answer
    Michel van den Brink Profile Picture
    4,697 on at
    RE: Error when trying to GET data from HTTPClient in a native application

    Hello Jeetus,

    This is an issue you will get when not performing the request on TLS 1.2

    Microsoft announced last year it would start making it manditory to use TLS 1.2 when consuming the Dynamics 365 API and resources on version 9 organizations (Article in question: https://blogs.msdn.microsoft.com/crm/2017/09/28/updates-coming-to-dynamics-365-customer-engagement-connection-security/ ) Messages about this have also been appearing over the last few weeks in the Office 365 message center.

    On to solutions:

    1. If you're building an application using .NET Framework 4.5.2 or below, then your app is NOT YET configured to use TLS 1.2, which you will need to do.
      • The most future proof solution is to change the target framework of your application to a minimum of .NET Framework 4.6.2 - that way it will default to using TLS 1.2

        This is the recommended solution

      • Alternative: If you do not have the ability to change the target framework version of your application, you can add this line of code to your application, before you make any HTTP calls to Dynamics 365. This will force your application to use TLS 1.2 under all circumstances. 

        This is a work-around and not a great future proof solution but, good enough if you're in a pinch.
        System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;

      Hope my answer helps you out, if you have any other questions, let me know.

      If you found my answer useful, please mark it as such/verified :-)

    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

    🌸 Community Spring Festival 2025 Challenge Winners! 🌸

    Congratulations to all our community participants!

    Adis Hodzic – Community Spotlight

    We are honored to recognize Adis Hodzic as our May 2025 Community…

    Kudos to the April Top 10 Community Stars!

    Thanks for all your good work in the Community!

    Leaderboard > Microsoft Dynamics CRM (Archived)

    #1
    Mohamed Amine Mahmoudi Profile Picture

    Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

    #2
    Community Member Profile Picture

    Community Member 52

    #3
    Victor Onyebuchi Profile Picture

    Victor Onyebuchi 6

    Overall leaderboard

    Featured topics

    Product updates

    Dynamics 365 release plans