From 2628cb632f039f1a84267c8431ef8a05477540f2 Mon Sep 17 00:00:00 2001 From: Slawomir Koszewski Date: Sat, 7 Feb 2026 13:22:31 +0100 Subject: [PATCH] Prompt update and output config --- scripts/get-full-app-info.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/scripts/get-full-app-info.sh b/scripts/get-full-app-info.sh index 610d6fe..a7fda3d 100755 --- a/scripts/get-full-app-info.sh +++ b/scripts/get-full-app-info.sh @@ -1,5 +1,28 @@ #!/usr/bin/env bash APP_NAME="$1" +if [[ -z "$APP_NAME" ]]; then + echo "Usage: $0 " + exit 1 +fi + APP_ID=$(az ad app list --display-name "$APP_NAME" --query "[0].appId" -o tsv) +if [[ -z "$APP_ID" ]]; then + echo "Error: Application '$APP_NAME' not found." + exit 1 +fi + +TENANT_ID=$(az account show --query tenantId -o tsv) +if [[ -z "$TENANT_ID" ]]; then + echo "Error: Failed to resolve tenantId from current Azure CLI context." + exit 1 +fi + az ad app show --id "$APP_ID" -o json +cat <