web
You’re offline. This is a read only version of the page.
close
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

I have the same question (0)
  • Suggested answer
    Michel van den Brink Profile Picture
    4,697 on at

    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

    Responsible AI policies

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

    Neeraj Kumar – Community Spotlight

    We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

    Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

    #1
    SA-08121319-0 Profile Picture

    SA-08121319-0 4

    #1
    Calum MacFarlane Profile Picture

    Calum MacFarlane 4

    #3
    Alex Fun Wei Jie Profile Picture

    Alex Fun Wei Jie 2

    Last 30 days Overall leaderboard

    Featured topics

    Product updates

    Dynamics 365 release plans