Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

How to send .Key certificate with Web Service using AL

(0) ShareShare
ReportReport
Posted on by 5

A large US bank requires a Pem certificate and a Key certificate to be sent when calling their web service. Basically this is what the cURL looks like if it helps:

pastedimage1656547443504v4.png

I am able to successfully call the WS using Postman and as you can see Postman caters for a Key and a Cert (here I use the Pem certificate) certificate. 

pastedimage1656547110936v2.png

In AL I am using the following code to to add the certificates in the hope that I can add the two certificates, however when I get to loading the Key Certificate, it throws out a message "Cannot find the requested object" when hitting the code lClient.AddCertificate(lKeyCert,'')

pastedimage1656547625069v6.png

It appears either AL does not recognize a .Key file as a certificate or there is no function to cater for Key certificates.

I am trying to avoid using DotNet as this customer will be transitioning to the cloud.

Has anyone come across this issue before and got around it?

AL Language v9.3.646020

BC On Prem Version: NA Business Central 17.2 (Platform 17.0.19353.19730 + Application 17.2.19367.19735)

  • Rebe.Gwaindepy Profile Picture
    Rebe.Gwaindepy 162 on at
    How to send .Key certificate with Web Service using AL
    Hi everyone, 

    Did anyone manage to get a solution on how to use the Cert PEM and Key PEM directly in AL?
     
    Thanks,
     
  • Suggested answer
    Marco Mels Profile Picture
    Marco Mels on at
    RE: How to send .Key certificate with Web Service using AL

    Hello,

    We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist.  If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    www.dynamicsuser.net/.../14

    I will open this up to the community in case they have something to add.

    Thanks.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey Pt 2

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,883 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,569 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans