public void AddUserToTeam(Guid teamId, Guid userId)
{
CrmService service = new CrmService();
service.Credentials = ......passare credenziali di amministratore
AddMembersTeamRequest addRequest = new AddMembersTeamRequest();
addRequest.TeamId = teamId;
addRequest.MemberIds = new Guid[] { userId };
AddMembersTeamResponse addResponse =
(AddMembersTeamResponse)service.Execute(addRequest);
}
public void RemoveUserForTeam(Guid teamId, Guid userId)
{
CrmService service = new CrmService();
service.Credentials = ......passare credenziali di amministratore
RemoveMembersTeamRequest remove = new RemoveMembersTeamRequest();
remove.TeamId = teamId;
remove.MemberIds = new Guid[] { userId };
RemoveMembersTeamResponse removed = (RemoveMembersTeamResponse)service.Execute(remove);
}