D365 Finance & Operations and Dynamics AX Forum

Expand all | Collapse all

Dynamic Security Role Assignment

  • 1.  Dynamic Security Role Assignment

    GOLD CONTRIBUTOR
    Posted 6 days ago
    Hi everyone,

    I am trying to automatically assign a certain role (role A) to people who have been assigned role B or C. It looks like all of the queries available in the "dynamically assign users to roles", I can really only look for specific users, and not users with specific roles. Can anyone share their insight with me if what I am trying to do is possible at all?

    We're using D365FO and making role A a subrole to role B and/or C is not an option as it's related to order hold codes where the role has to be directly assigned to the user.

    Thank you!

    ------------------------------
    Kerstin Newman
    Business Analyst
    StarTech.com
    London ON
    ------------------------------
    Conference-AXUG_200x200


  • 2.  RE: Dynamic Security Role Assignment

    MICROSOFT MVP
    Posted 6 days ago
    Hi Kerstin,

    You can extend the query with new table joins to include the role assignments. Or create a new AOT query starting with the UserInfo table and create the related datasources for the role assignments.
    I wrote blogs in the past explaining how it works in AX2012. It is still valid for Dynamics 365.
    https://dynamicspedia.com/2014/01/automatic-role-assignment-in-ax2012-part-1/
    https://dynamicspedia.com/2014/01/automatic-role-assignment-in-ax2012-part-2/

    ------------------------------
    kind regards,

    André Arnaud de Calavon
    Solution Architect, Microsoft MVP - Microsoft Dynamics Business Solutions
    ------------------------------

    Conference-AXUG_200x200


  • 3.  RE: Dynamic Security Role Assignment

    GOLD CONTRIBUTOR
    Posted 5 days ago
    Thanks, André! I am not a developer, so will have to get one involved to figure this out if that's the way to do it. I appreciate the insight!

    ------------------------------
    Kerstin Newman
    Business Analyst
    StarTech.com
    London ON
    ------------------------------

    Conference-AXUG_200x200


  • 4.  RE: Dynamic Security Role Assignment

    TOP CONTRIBUTOR
    Posted 5 days ago
    If you always want Role B or C for users with role A, can't you simply assign roles B and C as subroles of role A?

    ------------------------------
    Mark Schurmann
    Accounting Systems Manager
    Automobile Protection Corp
    Norcross GA
    ------------------------------

    Conference-AXUG_200x200


  • 5.  RE: Dynamic Security Role Assignment

    GOLD CONTRIBUTOR
    Posted 5 days ago
    Hi Mark,

    Yes, that's what I was hoping I'd be able to do but wasn't sure. My assumption was that to be able to clear an order hold code, a user has to have that specific role and it can't be a sub-role to another role. I tested it yesterday after creating this post, and it actually did work being a sub-role, so that's what I will do..

    Thank you!

    ------------------------------
    Kerstin Newman
    Business Analyst
    StarTech.com
    London ON
    ------------------------------

    Conference-AXUG_200x200


If you've found this thread useful, dive deeper into User Group community content by role