web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Security artifacts and VSTS

(0) ShareShare
ReportReport
Posted on by

So I understand that in Dynamics 365 for Operations, new security elements (e.g. Roles, Duties, Privileges) can be created in 2 ways: either through Visual Studio, where they belong to a model and a package, and exist as an .xml file. Or, via the UI (ie. the browser) where they exist in the database only. I also understand that a synchronization will push the .xml security elements into the database to live alongside the other UI-created elements.

The Visual Studio-created security elements (the .xml files) can be added to VSTS, for source control. They can also be added to deployable packages to be promoted to other environments. This would be my preferred method of development and promotion, as the elements are safer because of VSTS.

But I don't see any way to get the UI-created security elements under source control, other than having a developer recreate them manually in Visual Studio.

Does any one have some experience with this? It seems like a rather disjointed, difficult-to-manage approach to security development. 

I currently have a situation where a functional resource (unbeknownst to me) has been creating some new security roles via the UI, in a DEV/TEST (Build) environment. Obviously these are not currently under any kind of source control, and would be at risk of being destroyed if someone was to restore a copy of a different data set over the top of this environment (as is done periodically during the implementation phase). 

Are the UI-created elements actually being saved as .xml files somewhere that I'm not aware of? Or are we stuck with this split approach to security development?

Any feedback or first-hand experience would be appreciated! Thanks!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mea_ Profile Picture
    60,284 on at

    Hi David Hand,

    You can export security changes using standard data entity and then deploy them using data package through LCS.

    I have a blog post regarding this question, maybe it will help you ievgensaxblog.wordpress.com/.../role-based-security-in-dynamics-365-for-operations-export-security-changes-and-security-diagnostics-tool

  • David Hand Profile Picture
    on at

    I read your blogs. They were great! I learned pretty much everything I know now about D365 security artifacts from them. However, I understand that the security artifacts can be deployed with a data package. But how can we make sure they are all source controlled in VSTS, like the other metadata changes? Maybe the answer is that they can't be - so be it.  I just find this new split approach to developing security to be a little haphazard, and leaves itself open to potential loss of modifications, if someone were to restore a different dataset over the top of the one where people had been "developing" security through the UI.

  • Mea_ Profile Picture
    60,284 on at

    You already know the answer - it can't be controlled.  It's data, not metadata :) Do as much as you can via code and deploy the rest via packages.  You can ask yourself what should you do with configuration that was done in DEV, because testing was done on particular configuration and different configuration could gave you different behavior.  

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans