From 786c4ab7025fea028ea069c9a65e8209f24a8a1a Mon Sep 17 00:00:00 2001 From: Pavan-Microsoft Date: Fri, 28 Nov 2025 15:10:30 +0530 Subject: [PATCH] fix: update identity query to exclude 'id-backend-' prefix --- infra/scripts/run_process_data_scripts.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/infra/scripts/run_process_data_scripts.sh b/infra/scripts/run_process_data_scripts.sh index 94b31fc33..77a1b32be 100644 --- a/infra/scripts/run_process_data_scripts.sh +++ b/infra/scripts/run_process_data_scripts.sh @@ -25,7 +25,7 @@ echo "Fetching Key Vault and Managed Identity from resource group: $resourceGrou keyVaultName=$(az keyvault list --resource-group "$resourceGroupName" --query "[0].name" -o tsv) # === Retrieve the ID of the first user-assigned identity with name starting with 'id-' === -managedIdentityResourceId=$(az identity list --resource-group "$resourceGroupName" --query "[?starts_with(name, 'id-') && !starts_with(name, 'id-sql-')].id | [0]" -o tsv) +managedIdentityResourceId=$(az identity list --resource-group "$resourceGroupName" --query "[?starts_with(name, 'id-') && !starts_with(name, 'id-backend-')].id | [0]" -o tsv) # === Normalize managedIdentityResourceId (necessary for compatibility in Git Bash on Windows) === managedIdentityResourceId=$(echo "$managedIdentityResourceId" | sed -E 's|.*(/subscriptions/)|\1|') @@ -34,7 +34,7 @@ managedIdentityResourceId=$(echo "$managedIdentityResourceId" | sed -E 's|.*(/su sqlServerLocation=$(az sql server list --resource-group "$resourceGroupName" --query "[0].location" -o tsv) # === Retrieve the principal ID of the first user-assigned identity with name starting with 'id-' === -managedIdentityClientId=$(az identity list --resource-group "$resourceGroupName" --query "[?starts_with(name, 'id-') && !starts_with(name, 'id-sql-')].clientId | [0]" -o tsv) +managedIdentityClientId=$(az identity list --resource-group "$resourceGroupName" --query "[?starts_with(name, 'id-') && !starts_with(name, 'id-backend-')].clientId | [0]" -o tsv) # === Check for VNet deployment === echo "Checking for VNet deployment in resource group: $resourceGroupName"