Identifying Roles for Security in Dynamics 365 for Operations

by | Updated December 29, 2017 | Dynamics 365 for Finance and Operations, Security

With Dynamics 365 for Operations comes change. And change is good, it helps keep us on our toes and gives us an opportunity to freshen up our skill sets. There is plenty of change with Dynamics 365 for Operations and one such opportunity to freshen up my security skillsets recently presented itself.

A client asked what role they needed to add a user to in order for the user to be able to run Process assortments from the Retail module.

SecurityRoles_Dynamics365forOperations_JoshLee1

The Process assortments link simply popped out a flyout form to run a batch job that executed the Retail Assortments Job.

SecurityRoles_Dynamics365forOperations_JoshLee2

A Quick Review – Security in Dynamics 365 for Operations

Security in Dynamics 365 for Operations is largely unchanged from Dynamics AX 2012. It’s still focused on role-based security with a minor new layer of Azure Active Directory as an authentication mechanism before the authorization piece. I’m not going to cover how security works in Dynamics 365 for Operations, but if you are interested in learning more, review the following links:

In a nutshell, this is how security is structured in Dynamics 365 for Operations:

SecurityRoles_Dynamics365forOperations_JoshLee3

Security Changes in Dynamics 365 for Operations

There are a few changes to security in Dynamics 365 for Operations, while not exhaustive, they are:

  • Process Cycles have been removed
  • Record Level Security is obsolete
  • Security changes are stored as data when done from the UI

The root of all security is gained by placing users within a defined Security Role to grant them access to whatever it is they need access to (this is really simplifying security).  In Dynamics AX 2012, the old way of figuring out when a user didn’t have access to something (in this case that something is a menu item), you could do the following:

  • Identify the area the user didn’t have access to
  • Log into Dynamics AX as a sysadmin
  • Right-click on it on the area, select personalize and identify what the object was
  • Open the AOT and select the object (or find the root object)
  • Use the Security tools add-in to View Related security roles report

This is a simplified overview of how you could determine what role a user might need to be added to gain access to an object (form, menu item, etc.)

Identifying What Roles Have Access to An Object

With Dynamics 365 for Operations, things have changed.  The old way of identifying what role(s) have access to an object is different, as the interface and client are different. Let’s circle back to the question at the start of this blog.

What role(s) have access to run the Process assortments job in Retail?

There were two ways this question could potentially be answered:

  1. Use Task Recorder to create a recording of the steps in the process and then use Security diagnostics for task recordings (System Administration | Security) to review required permissions.
  2. Use a developer machine, open Visual Studio and navigate through the AOT to find the object and default roles that have permission.

I started with option number one above, however, I found that the recording simply didn’t provide any security context information since it was a flyout and not a true form:

Here are the recording steps:

SecurityRoles_Dynamics365forOperations_JoshLee4

And here is what the Security diagnostics for task recordings showed (short version – total bust):

SecurityRoles_Dynamics365forOperations_JoshLee5

SecurityRoles_Dynamics365forOperations_JoshLee6

Option number two it is.

Identifying Roles in Visual Studio

To start I did the following:

  1. Logged into a Developer Machined
  2. Opened Visual Studio
  3. Navigated to AOT | User Interface | Menus | RetailMain | RetailITMenu | ProductsAssortmentExploderJobScheduler

SecurityRoles_Dynamics365forOperations_JoshLee7

First I looked at the Properties window to determine what objects are involved.  In this case, it’s a Menu Item with a type of Action.

SecurityRoles_Dynamics365forOperations_JoshLee8

Next, I navigated to AOT | User Interface | Menu Items | Action | RetailAssortmentExploderJobScheduler

SecurityRoles_Dynamics365forOperations_JoshLee9

Then I right clicked on the menu action and selected Open designer

SecurityRoles_Dynamics365forOperations_JoshLee10

From the designer window, right click on the RetailAssortmentExploderJobScheduler and select Addins | View related roles

SecurityRoles_Dynamics365forOperations_JoshLee11

And here is the resulting report showing what Roles by default have access to this object thus answering the question what roles a user might need to be added to be able to run the Process Assortments job.

SecurityRoles_Dynamics365forOperations_JoshLee12

 

Related Posts

2 Comments

  1. Iván Valdés

    Hi,
    Do you know if exists any way to assign roles automatically to a user which is in a group? Maybe can I assign roles to user groups? If I can’t do that, what can I do similar?

    Thank you.

  2. Brandon Carmichael

    Hello Ivan,

    If you are referring to an Active Directory group, then yes, you can assign role to AD group as in other AX environment.
    For example, you can create a group call DAXALL in AD, then put all your AX users in this AD group. Then when you add this group in AX, anyone that is in this AD group can login to AX.
    So this allows the AX admin to just add this DAXALL group in AX once vs having to enter the individual users in that group into AX.

    Hope this helps,
    Brandon

Submit a Comment

Your email address will not be published. Required fields are marked *

Upcoming Events

november

05nov11:00 am12:00 pmConfab with Stoneridge - Livestream - Project Oakdale: The NEW Integration of Power Platform into Teams

18nov10:00 am10:30 amThe Modern Manufacturer - Tears and Trauma of MRP

19nov11:00 am12:00 pmConfab with Stoneridge - Livestream - Project Oaktree: NEW Functionality for Dynamics 365 Manufacturing

december

02dec9:00 am12:00 pmOnline Workshop - Dynamics GP Year End Close (Morning Session)

03dec11:00 am12:00 pmConfab with Stoneridge - Livestream: Live Agents, Power Virtual Agents, Omnichannel – Oh My!

03dec1:00 pm4:00 pmOnline Workshop - Dynamics GP Year End Close (Afternoon Session)

09dec10:00 am10:30 amThe Modern Manufacturer - Manufacturing Policy Management

17dec11:00 am12:00 pmConfab with Stoneridge - Livestream - Technology in 2020: A Year in Review

About Stoneridge
Stoneridge Software is a unique Microsoft Gold Partner, with emphasis on partner. With specialties in Microsoft Dynamics 365, Microsoft Dynamics AX, Microsoft Dynamics NAV, Microsoft Dynamics GP and Microsoft Dynamics CRM, we focus on attracting the most knowledgeable experts in the field to our team, and prioritize delivering stellar solutions with maximum impact for your business. At Stoneridge, we are deeply committed to your results. Each engagement is met with a dedicated team, ready to provide thorough, tailored, and expert service. Based in Minnesota, we intentionally “step into your shoes,” wherever you are. We focus on what you care about, and develop trusting, long-term relationships with our clients.

Subscribe To Our Blog

Sign up to get periodic updates on the latest posts.

Thank you for subscribing!

X