#!/bin/sh
client_name="$1"
if [ -z "$client_name" ]; then
echo >&2 "usage: $0 client-name"
exit 1
fi
kcadm.sh get clients \
-r "$REALM" \
-q "clientId=$client_name" \
--fields id \
--format csv \
--noquotes