Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Business Central forum

BC140 - XML Signing

(0) ShareShare
ReportReport
Posted on by 15

I've been trying to sign XML through CU 6227 "Signed XML Mgt." with function SignXmlText,

Function requires "private key", and i don't know how would i get private key.

CU 3043 "DotNet_X509Certificate2" that has no external function to get private key, and dotnet variable DotNetX509Certificate2 has privatekey method, to return private key.

And function that initializes CU X509Certificate2 does not work because one of the parameters is Codeunit "DotNet_X509KeyStorageFlags" that has no external functions so it cant be initialized.

So my question is, how do i sign XML?

  • Felipe Kavai Profile Picture
    35 on at
    RE: BC140 - XML Signing

    Hey,

    I am like the same problem, did you get any solution?

  • fmoric@In2 Profile Picture
    15 on at
    RE: BC140 - XML Signing

    Yes, through extension.

    I've missed a few details:

    So I have certificate (p12) that we get from Tax Authority for signing XML to send invoices to Tax Authority.

    I was thinking about using Certificates to store certificate in database, so i can sign XML.

    But problem is that i don't know how to get private key from certificate, so i can sign XML.

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at
    RE: BC140 - XML Signing

    Do you want to do that in SaaS? I think it's quite hard, private keys or certificates are nornaly stored on the client machine.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central forum

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans