Create and Modify Duties, Privileges, and Permissions
Create new roles, duties, and privileges
In Visual Studio, you can create new roles, duties, and privileges by adding an item to your project in the Solution Explorer window. Additionally, you can create new permissions directly through a privilege in the element designer window.
Two ways to assign duties to a role are:
Add a new duty within the Duties node of the role in the element designer window.
Select a duty from the Application Object Tree (AOT) and drag it to the Duties node in the element designer window. This same process applies to assigning privileges to roles. You can also create an extension of an existing role, duty, or privilege. This would allow you to add or remove a duty from a role, or perhaps change a view-only privilege to an edit privilege for a certain page in finance and operations apps.
Follow these steps to create a new security element:
In Visual Studio, go to the Solution Explorer window.
Right-click your project and select Add > New Item.
In the left column, under the Dynamics 365 Items node, select Security.
Select Security Role, Security Duty, or Security Privilege, depending on the type of element that you need to create.
Enter a Name for the security element.
Select Add to add this element to your project. The element will now be open in the element designer window.