You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
az login --identity --client-id ${managedIdentityClientId}
31
+
# Authenticate with Azure
32
+
if az account show &> /dev/null;then
33
+
echo"Already authenticated with Azure."
34
+
else
35
+
if [ -n"$managedIdentityClientId" ];then
36
+
# Use managed identity if running in Azure
37
+
echo"Authenticating with Managed Identity..."
38
+
az login --identity --client-id ${managedIdentityClientId}
39
+
else
40
+
# Use Azure CLI login if running locally
41
+
echo"Authenticating with Azure CLI..."
42
+
az login
43
+
fi
44
+
echo"Not authenticated with Azure. Attempting to authenticate..."
45
+
fi
46
+
47
+
33
48
# Using az storage blob upload-batch to upload files with managed identity authentication, as the az storage fs directory upload command is not working with managed identity authentication.
0 commit comments