Encryption error occurred with exception or CryptoEncryptionException error in D365 FO - D365 F&O

Hello everyone, 

Today I came across the below error after restoring the data base from a Tier-2 (SIT/UAT/TEST) environment which has integrations enabled (Dual Write, Business Events... etc., etc.,)



Root cause:

There could be many reasons why this issue might have come but in my case this occurred due to the left over records(data looks like API keys, Dual Write configuration details, Azure key vault related data) caused the issue.