Skip to main content



No record found.

Business Central forum
Suggested answer

Codeunit 6227 "Signed XML Mgt."

Posted on by Microsoft Employee

We are trying to implement XmlDocument signing on Business Central.

If we understand the code correctly, we're supposed to import certificates into isolated storage, which we did.

And then we think we're supposed to use SignXmlText function from codeunit 6227.

[External] SignXmlText(XmlText : Text;PrivateKey : Text) : Text

However there does not seem to be any way to get access to the privatekey.

By looking at the code this is supposed to be hex encoded binary blob with the actual private key data.

Are there any samples / documentation where we could see how we're supposed to do this?

Docker image:

Application version: 14.0.26992.0

Platform version: 14.0.26873.0

  • CU23060257-1 Profile Picture
    CU23060257-1 2 on at
    Codeunit 6227 "Signed XML Mgt."
    I got (what I think is a key) using the code:
    [Ok := ]  IsolatedStorage.Get(Key: String, [DataScope: DataScope], var Value: Text)
    It looks like: (11kb long)
    When I parse this to Cod6227 SignedXMLMgt.SignXmlText(), I got the error:
    A call to System.Security.Cryptography.RSACryptoServiceProvider.ImportCspBlob failed with this message: Bad Version of provider.
    The version I am using is BC14.
  • BojanL Profile Picture
    BojanL 12 on at
    RE: Codeunit 6227 "Signed XML Mgt."

    He probably thinks about table 1262 "Isolated Certificate" not "Isolated storage"?

    This can be done through UI.




  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,154 on at
    RE: Codeunit 6227 "Signed XML Mgt."

    How is your code for importing the certificate key into the Isolated Storage?

    You can read a key saved in the Isolated Storage by using:

    [Ok := ]  IsolatedStorage.Get(Key: String, [DataScope: DataScope], var Value: Text)

    With this method, the key you read is associated to the Value text variable.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .


André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,420 Super User

Martin Dráb Profile Picture

Martin Dráb 225,672 Super User

nmaenpaa Profile Picture

nmaenpaa 101,148


Featured topics

Product updates

Dynamics 365 release plans