Skip to main content

Notifications

Dynamics 365 Community / Forums / Commerce forum / The required data encr...
Commerce forum
Suggested answer

The required data encryption certificate was not found when trying to edit the Database

Posted on by 4,725 Super User 2024 Season 2

We have deployed a Database Backup (bak) from one environment to another without using the detailed description we found later here

As we download retail data with distribution plan to channel we get this error:   

<Data Name="errorMessage">Microsoft.Dynamics.Ax.Xpp.ErrorException: The required data encryption certificate was not found when trying to edit the Database connection profile table and the ConnectionString field. Please add a valid certificate. Microsoft.Dynamics.Ax.Xpp.Security.CryptoEncryptionException: Encryption error occured with exception: Microsoft.Dynamics.Ax.Xpp.Security.CryptoEncryptionException: Encryption error occured with exception: Microsoft.Dynamics.AX.Configuration.CertificateHandler.NoCertificateFoundException: No certificate found for id 'BE78AE7782EBBAC00EC65C5652557D0D251F8A31'. at Microsoft.Dynamics.AX.Configuration.CertificateHandler.CertificateHandlerBase.GetCertificateFromLocalStore(X509FindType findType, String findValue) at Microsoft.Dynamics.AX.Configuration.CertificateHandler.CertificateHandlerBase.GetFirstCertificateForId(String id) at Microsoft.Dynamics.Ax.Xpp.Security.CryptoEncryptionEngine.GetCryptoServiceProviderByThumbprintBuffer(String idList, Byte[] thumbprint) ---> Microsoft.Dynamics.AX.Configuration.CertificateHandler.NoCertificateFoundException: No certificate found for id 'BE78AE7782EBBAC00EC65C5652557D0D251F8A31'. at ...

In the target envioronment where the error occurs a data encryption certificate is present, but the thumbprint is another one than this one is used here from D365Retail. 

How to get this running again ?

  • Ambanna Profile Picture
    Ambanna 20 on at
    RE: The required data encryption certificate was not found when trying to edit the Database

    Hi Andreas,

    Please can you tell us how you did it. Where do I find connection under my db connection?

  • Haris Rajpoot Profile Picture
    Haris Rajpoot 10 on at
    RE: The required data encryption certificate was not found when trying to edit the Database

    I am having the same issue, please suggest to me the best solution.

  • RE: The required data encryption certificate was not found when trying to edit the Database

    I had this issue, and I solved it putting in the connection string under my DB connection. After I did that it worked fine.

  • RE: The required data encryption certificate was not found when trying to edit the Database

    HI,

    I am also facing the same issue, below shows the error data, i was refreshed the D365 Dev DB with UAT DB, i applied all the steps which are on the article but no resolution.

    Data encryption/decryption failed when trying to edit the Database connection profile table and the ConnectionString field. System.FormatException: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters. at System.Convert.FromBase64_ComputeResultLength(Char* inputPtr, Int32 inputLength) at System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength) at System.Convert.FromBase64String(String s) at Microsoft.Dynamics.Ax.Xpp.xApplication.DecryptFromStringForPurpose(String _cipher, String _purpose) at Dynamics.AX.Application.Global.`editEncryptedStringField(Common _common, String value, Int32 _fieldId, Boolean _set) in xppSource://Source/ApplicationPlatform\AxClass_Global.xpp:line 9984

    Anyone can Help?

    Thanks in Advance.

    Rudramurthy

  • VRD Profile Picture
    VRD 517 on at
    RE: The required data encryption certificate was not found when trying to edit the Database

    Did anyone face this ? any suggestion for the fix?

  • VRD Profile Picture
    VRD 517 on at
    RE: The required data encryption certificate was not found when trying to edit the Database

    Hi Experts,

    I somehow not able to get rid of this error. Can someone please throw some light what could be the issue?

    I have my development box db restored from another development box.

    I performed below steps.

    1. Restored DB and Did DB synchronizatoin.

    2. Ran the script to create new db users  such as axretailruntimeuser etc.  as per the MS document Import Database on Tier 1 box

    3. Applied 'Environment Provisioning Tool'.

    I am still getting the error on channel database screen.

    pastedimage1649117335856v1.png

    I did restart of VM and did 'Environment Provisioning Tool' again and still no change.

    I also tried repeating all the steps mentioned above with another fresh db restore on the same environment but that too didn't work.

    What am I missing here? Please help. Thanks.

  • Suggested answer
    tprogrammer Profile Picture
    tprogrammer 10 on at
    RE: The required data encryption certificate was not found when trying to edit the Database

    hi, i just deleted and recreated the Azure Data Source, and that fixed the problem!!!

    Worksppaces--> Data Management--> Configure Data Source

  • Peter Ramer Profile Picture
    Peter Ramer 65 on at
    RE: The required data encryption certificate was not found when trying to edit the Database

    After you deploy a databack backup you need to apply an update in lcs called 'Environment Reprovisioning Tool'.  To do this, login to lcs.dynamics.com, click on the hamburger (three lines) at the top and select 'asset library'.  Go to the 'Software deployable package' tab.  Click on the Import button.  Then select the 'Environment Reprovisioning Tool' from the list, and click ok to bring it into the Asset Library.

    Next, navigate in lcs to your environments full details page.  Click 'apply updates', and select the 'Environment Reprovisioning tool' from the list.  You may need to wait a minute, but eventually the 'apply' button will become enabled.  Apply this package.

    This package should fix this certificate error.  It essentially replaces anything that was 'environment specific' in the recently restored database, with values that are correct for the current environment.

  • Suggested answer
    Ramune Profile Picture
    Ramune on at
    RE: The required data encryption certificate was not found when trying to edit the Database

    Hi Andreas,

    I will leave this for the community to answer. Let's see if anybody has experienced the same and can advise for you anything. If you will not get any feedback, please create a support ticket for us.

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 290,888 Super User 2024 Season 2 on at
    RE: The required data encryption certificate was not found when trying to edit the Database

    Hi Andreas,

    I have moved your question to the Commerce forum. Not sure if the documentation can help you with the post steps: docs.microsoft.com/.../import-database

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,888 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,247 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans