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

CleanupRole02

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.

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 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:

CleanupRole01

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 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…

CleanupRole03This 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.

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

CleanupRole04

That’s all for now. Till next time!

0 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.