Cleanup orphaned security roles in Microsoft Dynamics AX Update 1 local VM

Recently, I started working with a new local VM containing Microsoft Dynamics AX with Update 1. When setting up some users and roles, I found out that the demonstration data contains some rubbish in the security roles. This post will inform you about the issue and how to clean up orphaned security roles.

What is the issue?

First of all, the issue is not available in the environments deployed on Azure. The issue is within the initial use of the downloadable VM, which can be run hosted on a local PC or server using Hyper-V.

When trying to add a role to a user on the Users form, you will see a lot of strange roles that look like being used during tests by Microsoft. Microsoft confirmed this. You can see some of the orphaned roles in the next screenshot.

 

In addition when opening the Security configuration form you will get the next error several times:

How to solve this issue?

Initially I had used the Repair and Synchronize all options from the Security configuration form. This solved the problem on this form, but not at the stage where you can assign the roles. Then I started to look into the AxDB database on the virtual machine. I found some tables with these orphaned records. I deleted the incorrect roles from these tables, but then the Synchronize all option ended in an error every time, so the data was corrupted.

I created a new instance of the local virtual machine and started a full database synchronization from Visual Studio. You can start this form the menu Dynamics AX > Synchronize database…

This task can take 10-20 minutes, depending on the hardware resources of your VM host. When it is completed, it solved the issue. Now, only the applicable roles are visible when assigning roles.

Also, the Security configuration form opens without issues and shows the correct security roles.



I do hope you liked this post and will add value for you in your daily work as a professional. If you have related questions or feedback, don’t hesitate to use the Comment feature below.


That’s all for now. Till next time!

2 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.