Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions infra/scripts/process_sample_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -396,19 +396,15 @@ get_values_from_user() {

# Authenticate with Azure
echo ""
if az account show &> /dev/null; then
echo "Already authenticated with Azure."
echo "Attempting to authenticate with Azure..."
if [ -n "$managedIdentityClientId" ]; then
# Use managed identity if running in Azure
echo "Authenticating with Managed Identity..."
az login --identity --client-id ${managedIdentityClientId}
else
echo "Not authenticated with Azure. Attempting to authenticate..."
if [ -n "$managedIdentityClientId" ]; then
# Use managed identity if running in Azure
echo "Authenticating with Managed Identity..."
az login --identity --client-id ${managedIdentityClientId}
else
# Use Azure CLI login if running locally
echo "Authenticating with Azure CLI..."
az login
fi
# Use Azure CLI login if running locally
echo "Authenticating with Azure CLI..."
az login
fi
echo ""

Expand Down