Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

Possible to automatically update security role based on an option set field?

Posted on by Microsoft Employee

Hello,

In the User form, I want the user's security role to update automatically based on a "Workgroup" option set field.  Is this possible using a workflow or anything else?  If yes, how?

Thanks!

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Possible to automatically update security role based on an option set field?

    Hi,

    Unfortunately without code (plugin or custom workflow as suggested above) its not possible to assign security role based on option set filed. I have similar experience in my project , please note if you want to  do this automatic process using plugin, custom workflow you are basically increasing maintenance work in future for the organization. As you know using this procedure somewhere you need to keep hard-coded role  (assuming that you will maintain in configuration entity) , which may change in future . So my personal opinion is to go with manual process  while changing optionset value for the user.

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Possible to automatically update security role based on an option set field?

    Hi,

    You can assign/ remove security role of user but this will require you to write custom code. You can either build a plugin to do so or a custom workflow activity whioch you can use within out of box workflows-

    Yopu can refer this sample code-docs.microsoft.com/.../sample-associate-security-role-user

    Hope this helps.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans