function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Venkatramanan LakshmananVenkatramanan Lakshmanan 

Decrypting Salesforce Encrypted fields

Hi everyone,

I am using the REST API from .NET code and fetching one of my custom Encrypted fields from the contact object. How should i decrypt this encrypted field valud to get the actual text in C# ?

Please advise..

Make sure that logged in user profile has enabled  "View Encrypted Data" permission. 
Venkatramanan LakshmananVenkatramanan Lakshmanan
Thanks for your reply.. but the requirement will be to retrieve the encrypted text from salesforce and decrypt in .NET code and use it for further functionality.

Please advise.
That wont be possible. Salesforce encryption cannot be decrypted. As Karanraj has written only option is to give permission "View Encrypted Data" on profile. You may need to write your custom encryption logic and store it in normal text field.