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 cleanup orphaned security roles.
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 which looks 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:
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 everytime, 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.
That’s all for now. Till next time!