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
Copy file name to clipboardExpand all lines: infra/scripts/copy_kb_files.sh
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,14 @@ else
44
44
echo"Not authenticated with Azure. Attempting to authenticate..."
45
45
fi
46
46
47
+
echo"Getting signed in user id"
48
+
signed_user_id=$(az ad signed-in-user show --query id -o tsv)
49
+
50
+
echo"Getting storage account resource id"
51
+
storage_account_resource_id=$(az storage account show --name $storageAccount --query id --output tsv)
52
+
53
+
# add Storage Blob Data Contributor role to the user
54
+
az role assignment create --assignee $signed_user_id --role "Storage Blob Data Contributor" --scope /$storage_account_resource_id
47
55
48
56
# 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