Inheritance: IIdAndNameCommand
        public Guid AddUser(string accountName, AccountType type, string displayName, IEnumerable<string> authenticatedGroups, 
            IEnumerable<KeyValuePair<string, string>> customProperties)
        {
            Guid userId = Guid.NewGuid();
            var properties = customProperties != null ? customProperties.ToList() : null;
            var createUserCommand = new CreateUserCommand(userId, displayName, properties);
            commandBus.Value.Send(Envelope.Create(createUserCommand));

            var createAccountCommand = new CreateExternalUserAccountCommand(userId, type, accountName);
            commandBus.Value.Send(Envelope.Create(createAccountCommand));

            SetRolesAndGroups(userId, authenticatedGroups);

            return userId;
        }