Dynamics CRM: How To Get The Secure and Unsecure Configurations List

First, before we go to the main idea, do you know about Dynamics CRM Plugin Secure/Unsecure Configuration? We can put a string value on our plugin step, and then we can consume those values in our plugin code to do some logic. There are two types of configuration: Secure and Unsecure. The differentiation for these 2 configurations is how the system stores the value. For more information, you can check this blog post.

How to add Secure and Unsecure Configuration in the plugin step.

For those who already know about these configurations (Secure and Unsecure), do you ever wonder the easiest way to check your Plugins' Secure and Unsecure Configurations? To know your configurations, you need to download SQL 4 CDS by Mark Carrington (from XrmToolBox, you just need to go to the store and search with the keyword "SQL 4 CDS").

Once done with the step above, you can run the below query to get the configurations list:

SELECT DISTINCT 
       a.Name, 
       a.PluginAssemblyIdName, 
       b.Configuration 'UnsecureConfig', 
       c.SecureConfig 'SecureConfig'
FROM dbo.PluginType a
     JOIN SdkMessageProcessingStep b ON a.PluginTypeId = b.PluginTypeId
     LEFT JOIN dbo.SdkMessageProcessingStepSecureConfig c ON 
     c.SdkMessageProcessingStepSecureConfigId = b.SdkMessageProcessingStepSecureConfigId

Tips: To only get your custom plugin, you can add WHERE criteria (usually your plugin name will have the same prefix, so you can use that too).

Here is the result:

Dynamics CRM Plugin Secure+Unsecure Configuration List

Happy CRM-ing!

Leave a comment

Your comment is sent privately to the author and isn't published on the site.