Hi all,
Using an SSIS package in CRM 2011, I would like to change an user's businessunit. I have tried following code using SetBusinessSystemUserRequest but that need a reference to CRM.SDK.PROXY.dll, which is not working correctly with XRM.SDK.dll reference. How can I accomplish this?
// Create the request object.
SetBusinessSystemUserRequest user = new SetBusinessSystemUserRequest();
// Set the properties of the request object.
user.BusinessId = new Guid(userVariable);
SecurityPrincipal assignee = new SecurityPrincipal();
assignee.PrincipalId = new Guid(userVariable);
user.ReassignPrincipal = assignee;
user.UserId = new Guid(userVariable);
// Execute the request.
SetBusinessSystemUserResponse assigned = (SetBusinessSystemUserResponse) service.Execute(user);