Notifications
Announcements
No record found.
Do we need to imposonate calling user in order to read Secure configuration in Plugin development.
Can both secure and insecure be accessed by any user inside plugin(code).
*This post is locked for comments
Secure configuration parameters can only be viewed by CRM/D365E Administrators, whereas unsecure can be viewed by any user of the application.
Hope this helps.
You should be able to read if you will run your plugin on Admin user, but never tested it.
Hi Lathin,
I am pretty sure both secure and unsecure configuration will be available in the plugin constructor no matter what the role is. However, as a regular user you won't be able to read secure configuration values using fetchxml, for example (in other words, your plugin will have access to its configuration - those are the values passed to the constructor. But, if you decide to run a query from within the plugin to access secure configuration records, that might or might not work depending on the user roles)
Thanks Alex.
I just need to confirm if they are available in plugin constructor for any logged in user(our plugin runs as loggedin user's context). I just want to retrieve values in secure config in plugin constructor.
Never had a problem with that. Just keep in mind secure configuration won't be included into your solutions.
Secure configuration won't be accessible from constructor if the calling user context user not having System Administrator role . So in that case plugin should be impersonate with some system admin user context . Hope this helps.
Come on guys.. it takes 5 minutes to try.
It will be accessible in the constructor.
Thanks Alex. i already tried and i am able to access in constructor.(for 2-3 roles, other than system admin i tested). I believe accessing in constructor will not be an issue as you said.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
SA-08121319-0 4
Calum MacFarlane 4
Alex Fun Wei Jie 2