private void logAddOrRemoveFromGroupEvent(final UserRef userOrGroup,
                                              final UserRef group,
                                              final boolean wasSuccessful,
                                              final String outcomeDescription,
                                              final boolean isAddingGroup) {

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

        if (userOrGroup.isGroup()) {
            authoriseBuilder.addGroup(StroomEventLoggingUtil.createGroup(userOrGroup));
        } else {
            authoriseBuilder.addUser(StroomEventLoggingUtil.createUser(userOrGroup));
        }

        if (isAddingGroup) {
            authoriseBuilder.withAddGroups(AddGroups.builder()
                    .addGroups(StroomEventLoggingUtil.createGroup(group))
                    .build());
        } else {
            authoriseBuilder.withRemoveGroups(RemoveGroups.builder()
                    .addGroups(StroomEventLoggingUtil.createGroup(group))
                    .build());
        }

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

        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