Tag Archives: dynamics crm changing users business unit

{Useful to know}– Moving User’s Business Units in Dynamics CRM? Beware of all the side effects

We had this requirement recently with one of our clients. They had a change in their business processes and from team based security, they wanted to move to region based security.

What they wanted from us is to migrate their Users to specific Business Units based on regions. So they had five region which they set-up as Business Units. And they had around 600+ users who needs to be put under the respective business units (regions).

So we quick developed a data migration utility to do the job for us. The data migration utility would basically read from an excel file the user and their regions and then move the user in CRM to the appropriate business unit. When the business unit changes, we all know the security roles gets lost. So the utility also took care of the fact that it re-assigns the security roles to the user after the business unit of the user has changed.

So far so good. After data migration happened everything worked great. We verified the roles and business unit of the user and everything was fine.

However to our horror, the business of the customer complained that they were getting emails from CRM which they were not supposed to. And hence I was there again trying to find out what is causing the issue.

After rounds of debugging we found that there is a specific functionality in which email is triggered to the manager of an employee. The manager was set-up in CRM using the OOB Manager field. So what really triggered the wrong emails?

Well if you change the business unit of a user in CRM, the following are the effects on the manager field.

If the manager is in a business unit which is neither the same nor the parent business unit of the user, the manager of the user would be automatically changed to someone above the hierarchy.  For example – Say the following is the business unit structure.



And say we have three users (user1, user2 and user3).  Say before migration this was the org structure.

  • User1 belongs to BU1
  • User2 belongs to BU2
  • User3 belongs to BU2
  • User2 is the manager of User3

Now as per the data provided by the customers, both User2 and User3 should be in the same new BU. say in our example it is BU4.

The problem that happened is the order in which the users got migrated. So User2 (manager of user3) was first in the list. So when we migrated User2 to BU4, the manager now belongs to BU which is in the lower hierarchy than the reportee’s BU.

So what CRM did is, it re-assigned the manager of the User3 to User1 (belonging to BU1) automatically behind the scenes.

And this totally resulted in multiple wrong manager set-up and hence the wrong emails.


So if you have a requirement where you are needed to change the BU of the users, please do remember the effect on the manager field also. Also luckily we did not have manager hierarchy enabled for our customer. If manager hierarchy would have been enabled, this kind of wrong manager set-up would result in security breach as well.


Hope this helps!