There was a strange issue in CRM 2011 where the security roles of users part of a BU get removed when the BU’s parent BU is changed. This issue seems like fixed by Microsoft in CRM 2013 RU2 and we do not see that issue in CRM 2015 either.
If you are still using CRM 2011 and are affected with this issue, a work around would be to reassign the security roles through custom code or from UI after the parent BU change.
Through Code:
<pre>// Associate the user with the role. if (_roleId != Guid.Empty && _userId != Guid.Empty) { _serviceProxy.Associate( "systemuser", _userId, new Relationship("systemuserroles_association"), new EntityReferenceCollection() { new EntityReference(Role.EntityLogicalName, _roleId) }); Console.WriteLine("Role is associated with the user."); }</pre>
Filed under: Microsoft CRM 2013, Microsoft CRM 2015, Microsoft Dynamics, MS CRM 2011 Training Tagged: CRM 2013, Microsoft CRM 2011, Microsoft CRM 2015