As discussed in 917, moving Users between Business Units can be difficult and, as Joel suggested in 935, a good option when setting up a new system is to add a child Business Unit from the outset and add all the Users there. In a recent implementation I did not do this (in my defence, I did start the project before Joel wrote the tip.) So what do you do when you have ignored the Tips of the Day and are experiencing Spießrutenlaufen?
In my scenario I had 300 users to move to child Business Units. Also, as the change was driven by a security requirement, all Security Roles were changing. This was my approach.
First of all I needed to know who had what Security Roles. This can be done with the SSRS User Summary report which comes with Dynamics. You also will need to check whether any of your Teams have Security Roles assigned and whether these need moving and the consequences. In our case this was not a problem but, if it is, I would try Mitch Milan’s SnapShot! tool which is excellent for such things.
Exporting the User Summary report to Excel allows you to work out the ‘clusters’ of Users with the same security configuration. This means you can deal with groups of Users at once, which will save time. In my case this meant I was dealing with 90 clusters instead of 300 Users.
Once I knew the clusters, this is what I did:
- I set up a tickbox on the User record called “User in Transition”
- I created an On-Demand Workflow which toggled this tickbox
- I created a User view which showed all Users with the tickbox ticked
Why so much effort? Because this gave me the most flexibility as you cannot do much with Users in an Advanced Find search, other than run a Workflow. In theory you could do it all from the Settings – Users screen but I liked the idea of the tickbox in case I got distracted and wanted to double check where I was up to.
This was the process:
- Pick a cluster of Users (either handpicked in Settings – Users or via Advanced Find)
- Run the Workflow against them
- Go to Settings – Users and display the view of tickboxed Users
- Change the Business Unit for the Users
- Manage the Roles of the Users
- Run the Workflow again to toggle off the tickbox
- Confirm there are no Users in the tickbox view
- Rinse and repeat
I am sure others will have suggestions for alternative approaches e.g. automation through scripting and the use of some of the excellent tools in the xRMToolbox so if you have ideas, put them in the comments section below.
Interesting topic.
There is a tool in xrmtoolbox called user, team and security role report. The name is a bit misleading as it also can assign our remove security role. It can be used to find all users which all have certain roles. Can be used for discover the clusters. Finally it can assign a set of roles to a set of users.
I had a similar requirement a while back, and after much trial and error trying to pass the role names in plugin shared variables, ended up using a workflow to write the security role names to a custom field on the user before changing BU and then running another workflow after changing BU to reassign again. More detailed explanation below. Also reminded me that I still haven’t posted the full code…
https://lukesartaindynamics.wordpress.com/2016/12/19/reassign-security-roles-on-change-of-business-unit/