Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Digital signature - XML file

(0) ShareShare
ReportReport
Posted on by 25

Hi Everyone,

I was researching about digital signing an XML file, from what I saw, the digital certificate must be imported into the sandbox
and the private key should be obtained from that table (2000000107), I was trying to get the value through the IsolatedStorage.GET function and then sign it from the codeunit "Signed XML Mgt." without success so far, unfortunately it does not exist
Lots of documentation on this, does anyone know what is the correct process to sign my XML file in AL?, we use the SAAS version of BC

thank you so much

  • Verified answer
    Bilal Haider Profile Picture
    248 on at
    RE: Digital signature - XML file

    That makes sense. I also used C# at the end for PGP encryption and signing because of limited availability of functions in BC.

  • Diego91 Profile Picture
    25 on at
    RE: Digital signature - XML file

    hello bilal

    Thank you for your response, we have decided to approach the signature with Java, it gives us greater facilities in the same way, thank you very much

    greetings

  • Suggested answer
    Bilal Haider Profile Picture
    248 on at
    RE: Digital signature - XML file

    Hi,

    I have not tried using SignedXML Codeunit, but I gone through these functions while working on a project.

    You can try to use these functions from this CU.

    InitializeSignedXml(SigningXmlDocument: XmlDocument) // Your document that need to be signed

    SetSigningKey(XmlString: Text) //This is the key used to sign your document like at the end

    GetXml(): XmlElement // To get the signed xml back

    //

    <RSAKeyValue><Modulus>vIVB/S+boTqUH03VpVw8cIJ9XkXXirW/iXIJgdYUnkgpEglWP7w6ZWvpOQ+xdtc7u4Fn5w2zlOgkvjvGtGWjLR/OGjMILPIaTcKalCP9ccuSIF573VkYps5FGrvNpQrrJ4Kl10VW4vvw6db6RWdGWD0sS7UV0Twh66+tSLA+LX2nuHCv0S5ob5rQbxLoL5Py4kOUFoQBidvpk4MMIDv9Y/+RCzkpibyyQnCpv3jOBkRmLbHu9eaoRsc+hD4I2Lau5wg2F4ZhNw2qCVxtW5hLmPvxdNqm+3CP79Ba9L86+ZUsHvChPm6otfTwXrGEQEAagmo9Bn7xghK1d4Ngihc/Nw==</Modulus><Exponent>AQAB</Exponent>

    ........

    6XHMRPXrBmWISUvHimmK0L1r7D/lFBkRPlDFnCa1JxsuC2urYcSDcB7SWmhQFMCz6v7fnqgZzm0ukCDYkRhVhfeGL9bG+64ObsSgG3vhmhjJoduAjQ+LE1jpuPZBQ71KT6dlr4KllJxmSFWcNj+L1HrTqskyB6502JXOKsQJhzQaw8vOAk/+/bwzkJ5+UeoQ==</D></RSAKeyValue>

    //

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 1,452

#2
YUN ZHU Profile Picture

YUN ZHU 1,313 Super User 2025 Season 1

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 1,083 Most Valuable Professional

Featured topics

Product updates

Dynamics 365 release plans