private void logAddOrRemoveFromGroupEvent(final String userOrGroupName,
                                              final String groupName,
                                              final boolean wasSuccessful,
                                              final String outcomeDescription,
                                              final boolean isAddingGroup) {

        final AuthoriseEventAction.Builder<Void> authoriseBuilder = AuthoriseEventAction.builder();

        // Don't know if userOrGroupName is a user or group, so treat as a user

        authoriseBuilder.addUser(User.builder()
                .withId(userOrGroupName)
                .withName(userOrGroupName)
                .build());

        final Group groupBlock = Group.builder()
                .withId(groupName)
                .withName(groupName)
                .build();
        if (isAddingGroup) {
            authoriseBuilder.withAddGroups(AddGroups.builder()
                    .addGroups(groupBlock)
                    .build());
        } else {
            authoriseBuilder.withRemoveGroups(RemoveGroups.builder()
                    .addGroups(groupBlock)
                    .build());
        }

        final String description = LogUtil.message("{} user/group '{}' {} group '{}'",
                (isAddingGroup
                        ? "Add"
                        : "Remove"),
                userOrGroupName,
                (isAddingGroup
                        ? "to"
                        : "from"),
                groupName);

        stroomEventLoggingService.log(
                "CliAddToGroup",
                description,
                authoriseBuilder
                        .withOutcome(Outcome.builder()
                                .withSuccess(wasSuccessful)
                                .withDescription(outcomeDescription)
                                .build())
                        .build());
    }
Creates an account in the internal identity provider
<p>
e.g manage_users ../local.yml
--createUser admin
--createGroup Administrators
--addToGroup admin Administrators
--grantPermission Administrators Administrator
stroom-app/src/main/java/stroom/app/commands/ManageUsersCommand.java