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
Introduces azure_custom.yaml and main_custom.bicep for custom deployment scenarios, adds several infrastructure scripts for CosmosDB and Azure AI role assignments, and updates main.bicep outputs. Removes unused frontend components and services, and updates backend Dockerfile and foundry_service.py for new infrastructure integration.
az login --identity --client-id ${managedIdentityClientId}
17
+
else
18
+
# Use Azure CLI login if running locally
19
+
echo"Authenticating with Azure CLI..."
20
+
az login
21
+
fi
22
+
echo"Not authenticated with Azure. Attempting to authenticate..."
23
+
fi
24
+
25
+
26
+
IFS=','read -r -a principal_ids_array <<<$principal_ids
27
+
28
+
echo"Assigning Azure AI User role role to users"
29
+
30
+
echo"Using provided Azure AI resource id: $aif_resource_id"
31
+
32
+
forprincipal_idin"${principal_ids_array[@]}";do
33
+
34
+
# Check if the user has the Azure AI User role
35
+
echo"Checking if user - ${principal_id} has the Azure AI User role"
36
+
role_assignment=$(MSYS_NO_PATHCONV=1 az role assignment list --role 53ca6127-db72-4b80-b1b0-d745d6d5456d --scope $aif_resource_id --assignee $principal_id --query "[].roleDefinitionId" -o tsv)
37
+
if [ -z"$role_assignment" ];then
38
+
echo"User - ${principal_id} does not have the Azure AI User role. Assigning the role."
39
+
MSYS_NO_PATHCONV=1 az role assignment create --assignee $principal_id --role 53ca6127-db72-4b80-b1b0-d745d6d5456d --scope $aif_resource_id --output none
40
+
if [ $?-eq 0 ];then
41
+
echo"Azure AI User role assigned successfully."
42
+
else
43
+
echo"Failed to assign Azure AI User role."
44
+
exit 1
45
+
fi
46
+
else
47
+
echo"User - ${principal_id} already has the Azure AI User role."
0 commit comments