Some useful commands for the Azure CLI. Also check out JMESPath specifications for other functions you can use.
Get the principal OID for a given client ID in a tenant:
# add `--output tsv` to get the raw value without quotes
az ad sp show --id $id --query objectId