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 AX (Archived)

Ignoring certificate on HttpWebRequest call

(0) ShareShare
ReportReport
Posted on by

I'm trying to make a call to a RESTful API from within AX code.  The site I'm trying to reach has an invalid certificate that I would like to bypass.  Is it possible to bypass the certificate validation.  There is a method that looks as though it should do what I want, but I can't figure out how to use it in X++.

HttpWebRequest.set_ServerCertificateValidationCallback(RemoteCertificateValidationCallback value)

It's the parameter for this method that I don't understand.  RemoteCertificateValidationCallback is not an AX object that I can find.  I'm not sure how to set that value.  Does anyone know how this works or have a code sample?  Or is there another option for bypassing a certificate validation on an API call?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    It is a common scenario where some of the application functionalities depend on an external HTTPS endpoint. However, renewal of such SSL certificate for the external party is out of control and need to rely on the third party certificate which need to be renewed on time. There is a way to overcome this for DEV/UAT environments. Please click on the below link  for more details.

    ahelper-d365fo.blogspot.com/.../x-code-ignore-ssl-certificate.html

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 AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans