Hello @Anonymous , to read bash values into variables you have to use the read command like this:
printf "Put in the Group Id or Name\n"
read groupIdOrName
printf $groupIdOrName
printf "Put the Service Principle name(s) or ID(s)\n"
read -a sp_list
for sp in ${sp_list[@]}
do
echo $sp
done
Let us know if you need additional assistance. If the answer was helpful, please accept it and rate it so that others facing a similar issue can easily find a solution.