Skip to content

Commit 0861906

Browse files
Merge pull request #919 from microsoft/PSL-US-43670
refactor: Updated Foundry Roles name
2 parents 715ba55 + cd469db commit 0861906

8 files changed

Lines changed: 35 additions & 35 deletions

File tree

documents/LocalDevelopmentSetup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,10 +389,10 @@ Write-Host $PRINCIPAL_ID
389389
#### Azure AI Foundry & OpenAI Access
390390

391391
```bash
392-
# Assign Azure AI User role
392+
# Assign Foundry User role
393393
az role assignment create \
394394
--assignee $PRINCIPAL_ID \
395-
--role "Azure AI User" \
395+
--role "Foundry User" \
396396
--scope "/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.MachineLearningServices/workspaces/<ai-foundry-name>"
397397

398398
# Assign Cognitive Services OpenAI User role

infra/main.bicep

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -729,12 +729,12 @@ module aiFoundryAiServices 'modules/ai-services.bicep' = {
729729
managedIdentities: { userAssignedResourceIds: [userAssignedIdentity!.outputs.resourceId] } //To create accounts or projects, you must enable a managed identity on your resource
730730
roleAssignments: [
731731
{
732-
roleDefinitionIdOrName: '53ca6127-db72-4b80-b1b0-d745d6d5456d' // Azure AI User
732+
roleDefinitionIdOrName: '53ca6127-db72-4b80-b1b0-d745d6d5456d' // Foundry User
733733
principalId: userAssignedIdentity.outputs.principalId
734734
principalType: 'ServicePrincipal'
735735
}
736736
{
737-
roleDefinitionIdOrName: '53ca6127-db72-4b80-b1b0-d745d6d5456d' // Azure AI User
737+
roleDefinitionIdOrName: '53ca6127-db72-4b80-b1b0-d745d6d5456d' // Foundry User
738738
principalId: backendUserAssignedIdentity.outputs.principalId
739739
principalType: 'ServicePrincipal'
740740
}

infra/main.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"_generator": {
77
"name": "bicep",
88
"version": "0.43.8.12551",
9-
"templateHash": "9558335949477141360"
9+
"templateHash": "1762309424496235679"
1010
}
1111
},
1212
"parameters": {
@@ -396,7 +396,7 @@
396396
"sqlServerResourceName": "[format('sql-{0}', variables('solutionSuffix'))]",
397397
"sqlDbModuleName": "[format('sqldb-{0}', variables('solutionSuffix'))]",
398398
"webServerFarmResourceName": "[format('asp-{0}', variables('solutionSuffix'))]",
399-
"reactAppLayoutConfig": "{\r\n \"appConfig\": {\r\n \"THREE_COLUMN\": {\r\n \"DASHBOARD\": 50,\r\n \"CHAT\": 33,\r\n \"CHATHISTORY\": 17\r\n },\r\n \"TWO_COLUMN\": {\r\n \"DASHBOARD_CHAT\": {\r\n \"DASHBOARD\": 65,\r\n \"CHAT\": 35\r\n },\r\n \"CHAT_CHATHISTORY\": {\r\n \"CHAT\": 80,\r\n \"CHATHISTORY\": 20\r\n }\r\n }\r\n },\r\n \"charts\": [\r\n {\r\n \"id\": \"SATISFIED\",\r\n \"name\": \"Satisfied\",\r\n \"type\": \"card\",\r\n \"layout\": { \"row\": 1, \"column\": 1, \"height\": 11 }\r\n },\r\n {\r\n \"id\": \"TOTAL_CALLS\",\r\n \"name\": \"Total Calls\",\r\n \"type\": \"card\",\r\n \"layout\": { \"row\": 1, \"column\": 2, \"span\": 1 }\r\n },\r\n {\r\n \"id\": \"AVG_HANDLING_TIME\",\r\n \"name\": \"Average Handling Time\",\r\n \"type\": \"card\",\r\n \"layout\": { \"row\": 1, \"column\": 3, \"span\": 1 }\r\n },\r\n {\r\n \"id\": \"SENTIMENT\",\r\n \"name\": \"Topics Overview\",\r\n \"type\": \"donutchart\",\r\n \"layout\": { \"row\": 2, \"column\": 1, \"width\": 40, \"height\": 44.5 }\r\n },\r\n {\r\n \"id\": \"AVG_HANDLING_TIME_BY_TOPIC\",\r\n \"name\": \"Average Handling Time By Topic\",\r\n \"type\": \"bar\",\r\n \"layout\": { \"row\": 2, \"column\": 2, \"row-span\": 2, \"width\": 60 }\r\n },\r\n {\r\n \"id\": \"TOPICS\",\r\n \"name\": \"Trending Topics\",\r\n \"type\": \"table\",\r\n \"layout\": { \"row\": 3, \"column\": 1, \"span\": 2 }\r\n },\r\n {\r\n \"id\": \"KEY_PHRASES\",\r\n \"name\": \"Key Phrases\",\r\n \"type\": \"wordcloud\",\r\n \"layout\": { \"row\": 3, \"column\": 2, \"height\": 44.5 }\r\n }\r\n ]\r\n}",
399+
"reactAppLayoutConfig": "{\n \"appConfig\": {\n \"THREE_COLUMN\": {\n \"DASHBOARD\": 50,\n \"CHAT\": 33,\n \"CHATHISTORY\": 17\n },\n \"TWO_COLUMN\": {\n \"DASHBOARD_CHAT\": {\n \"DASHBOARD\": 65,\n \"CHAT\": 35\n },\n \"CHAT_CHATHISTORY\": {\n \"CHAT\": 80,\n \"CHATHISTORY\": 20\n }\n }\n },\n \"charts\": [\n {\n \"id\": \"SATISFIED\",\n \"name\": \"Satisfied\",\n \"type\": \"card\",\n \"layout\": { \"row\": 1, \"column\": 1, \"height\": 11 }\n },\n {\n \"id\": \"TOTAL_CALLS\",\n \"name\": \"Total Calls\",\n \"type\": \"card\",\n \"layout\": { \"row\": 1, \"column\": 2, \"span\": 1 }\n },\n {\n \"id\": \"AVG_HANDLING_TIME\",\n \"name\": \"Average Handling Time\",\n \"type\": \"card\",\n \"layout\": { \"row\": 1, \"column\": 3, \"span\": 1 }\n },\n {\n \"id\": \"SENTIMENT\",\n \"name\": \"Topics Overview\",\n \"type\": \"donutchart\",\n \"layout\": { \"row\": 2, \"column\": 1, \"width\": 40, \"height\": 44.5 }\n },\n {\n \"id\": \"AVG_HANDLING_TIME_BY_TOPIC\",\n \"name\": \"Average Handling Time By Topic\",\n \"type\": \"bar\",\n \"layout\": { \"row\": 2, \"column\": 2, \"row-span\": 2, \"width\": 60 }\n },\n {\n \"id\": \"TOPICS\",\n \"name\": \"Trending Topics\",\n \"type\": \"table\",\n \"layout\": { \"row\": 3, \"column\": 1, \"span\": 2 }\n },\n {\n \"id\": \"KEY_PHRASES\",\n \"name\": \"Key Phrases\",\n \"type\": \"wordcloud\",\n \"layout\": { \"row\": 3, \"column\": 2, \"height\": 44.5 }\n }\n ]\n}",
400400
"backendWebSiteResourceName": "[format('api-{0}', variables('solutionSuffix'))]",
401401
"webSiteResourceName": "[format('app-{0}', variables('solutionSuffix'))]"
402402
},
@@ -29627,9 +29627,9 @@
2962729627
},
2962829628
"dependsOn": [
2962929629
"aiFoundryAiServices",
29630-
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').aiServices)]",
29631-
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').openAI)]",
2963229630
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').cognitiveServices)]",
29631+
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').openAI)]",
29632+
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').aiServices)]",
2963329633
"virtualNetwork"
2963429634
]
2963529635
},
@@ -39943,10 +39943,10 @@
3994339943
}
3994439944
},
3994539945
"dependsOn": [
39946-
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageQueue)]",
3994739946
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageBlob)]",
39948-
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageDfs)]",
3994939947
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageFile)]",
39948+
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageQueue)]",
39949+
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageDfs)]",
3995039950
"userAssignedIdentity",
3995139951
"virtualNetwork"
3995239952
]

infra/main_custom.bicep

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -713,12 +713,12 @@ module aiFoundryAiServices 'modules/ai-services.bicep' = {
713713
managedIdentities: { userAssignedResourceIds: [userAssignedIdentity!.outputs.resourceId] } //To create accounts or projects, you must enable a managed identity on your resource
714714
roleAssignments: [
715715
{
716-
roleDefinitionIdOrName: '53ca6127-db72-4b80-b1b0-d745d6d5456d' // Azure AI User
716+
roleDefinitionIdOrName: '53ca6127-db72-4b80-b1b0-d745d6d5456d' // Foundry User
717717
principalId: userAssignedIdentity.outputs.principalId
718718
principalType: 'ServicePrincipal'
719719
}
720720
{
721-
roleDefinitionIdOrName: '53ca6127-db72-4b80-b1b0-d745d6d5456d' // Azure AI User
721+
roleDefinitionIdOrName: '53ca6127-db72-4b80-b1b0-d745d6d5456d' // Foundry User
722722
principalId: backendUserAssignedIdentity.outputs.principalId
723723
principalType: 'ServicePrincipal'
724724
}

infra/scripts/run_create_agents_scripts.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,26 +284,26 @@ else
284284
exit 1
285285
fi
286286

287-
# Check if the principal has Azure AI User role on the AI Foundry
287+
# Check if the principal has Foundry User role on the AI Foundry
288288
role_assignment=$(MSYS_NO_PATHCONV=1 az role assignment list \
289289
--role "53ca6127-db72-4b80-b1b0-d745d6d5456d" \
290290
--scope "$aiFoundryResourceId" \
291291
--assignee "$signed_user_id" \
292292
--query "[].roleDefinitionId" -o tsv)
293293

294294
if [ -z "$role_assignment" ]; then
295-
echo "✓ Assigning Azure AI User role for AI Foundry"
295+
echo "✓ Assigning Foundry User role for AI Foundry"
296296
MSYS_NO_PATHCONV=1 az role assignment create \
297297
--assignee "$signed_user_id" \
298298
--role "53ca6127-db72-4b80-b1b0-d745d6d5456d" \
299299
--scope "$aiFoundryResourceId" \
300300
--output none
301301
if [ $? -ne 0 ]; then
302-
echo "✗ Failed to assign Azure AI User role for AI Foundry"
302+
echo "✗ Failed to assign Foundry User role for AI Foundry"
303303
exit 1
304304
fi
305305
else
306-
echo "✓ Principal already has the Azure AI User role"
306+
echo "✓ Principal already has the Foundry User role"
307307
fi
308308

309309

infra/scripts/run_create_index_scripts.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ fi
7474

7575
# Note: Environment variables are now passed as parameters from process_sample_data.sh
7676

77-
### Assign Azure AI User role to the signed in user for AI Foundry ###
77+
### Assign Foundry User role to the signed in user for AI Foundry ###
7878
role_assignment=$(MSYS_NO_PATHCONV=1 az role assignment list --role 53ca6127-db72-4b80-b1b0-d745d6d5456d --scope $aif_resource_id --assignee $signed_user_id --query "[].roleDefinitionId" -o tsv)
7979
if [ -z "$role_assignment" ]; then
80-
echo "✓ Assigning Azure AI User role for AI Foundry"
80+
echo "✓ Assigning Foundry User role for AI Foundry"
8181
MSYS_NO_PATHCONV=1 az role assignment create --assignee $signed_user_id --role 53ca6127-db72-4b80-b1b0-d745d6d5456d --scope $aif_resource_id --output none
8282
if [ $? -ne 0 ]; then
83-
echo "✗ Failed to assign Azure AI User role for AI Foundry"
83+
echo "✗ Failed to assign Foundry User role for AI Foundry"
8484
exit 1
8585
fi
8686
fi

src/start.cmd

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -192,21 +192,21 @@ call az sql server ad-admin create ^
192192
--output tsv >nul 2>&1
193193
echo Azure SQL Server AAD admin role assigned successfully.
194194

195-
REM Assign Azure AI User role
196-
echo Checking Azure AI User role assignment...
195+
REM Assign Foundry User role
196+
echo Checking Foundry User role assignment...
197197
if not defined EXISTING_AI_PROJECT_RESOURCE_ID (
198198
echo Using AI Foundry account scope...
199199
FOR /F "delims=" %%i IN ('az role assignment list --assignee %signed_user_id% --role "53ca6127-db72-4b80-b1b0-d745d6d5456d" --scope "/subscriptions/%subscription_id%/resourceGroups/%AZURE_RESOURCE_GROUP%/providers/Microsoft.CognitiveServices/accounts/%AI_FOUNDRY_NAME%" --query "[0].id" -o tsv') DO set "aiUserRoleExists=%%i"
200200
if defined aiUserRoleExists (
201-
echo User already has the Azure AI User role.
201+
echo User already has the Foundry User role.
202202
) else (
203-
echo Assigning Azure AI User role to AI Foundry account...
203+
echo Assigning Foundry User role to AI Foundry account...
204204
call az role assignment create ^
205205
--assignee %signed_user_id% ^
206206
--role "53ca6127-db72-4b80-b1b0-d745d6d5456d" ^
207207
--scope "/subscriptions/%subscription_id%/resourceGroups/%AZURE_RESOURCE_GROUP%/providers/Microsoft.CognitiveServices/accounts/%AI_FOUNDRY_NAME%" ^
208208
--output none
209-
echo Azure AI User role assigned successfully.
209+
echo Foundry User role assigned successfully.
210210
)
211211
) else (
212212
echo Extracting foundry scope from existing AI project resource ID...
@@ -216,15 +216,15 @@ if not defined EXISTING_AI_PROJECT_RESOURCE_ID (
216216
echo Using foundry scope from existing project: !FOUNDRY_SCOPE!
217217
FOR /F "delims=" %%i IN ('az role assignment list --assignee %signed_user_id% --role "53ca6127-db72-4b80-b1b0-d745d6d5456d" --scope "!FOUNDRY_SCOPE!" --query "[0].id" -o tsv') DO set "aiUserRoleExists=%%i"
218218
if defined aiUserRoleExists (
219-
echo User already has the Azure AI User role.
219+
echo User already has the Foundry User role.
220220
) else (
221-
echo Assigning Azure AI User role to foundry account...
221+
echo Assigning Foundry User role to foundry account...
222222
call az role assignment create ^
223223
--assignee %signed_user_id% ^
224224
--role "53ca6127-db72-4b80-b1b0-d745d6d5456d" ^
225225
--scope "!FOUNDRY_SCOPE!" ^
226226
--output none
227-
echo Azure AI User role assigned successfully.
227+
echo Foundry User role assigned successfully.
228228
)
229229
)
230230

src/start.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ setup_environment() {
163163
--output tsv >/dev/null 2>&1
164164
echo "Azure SQL Server AAD admin role assigned successfully."
165165

166-
# Assign Azure AI User role
167-
echo "Checking Azure AI User role assignment..."
166+
# Assign Foundry User role
167+
echo "Checking Foundry User role assignment..."
168168
if [ -z "$EXISTING_AI_PROJECT_RESOURCE_ID" ]; then
169169
echo "Using AI Foundry account scope..."
170170
echo "AI Foundry Name: $AI_FOUNDRY_NAME"
@@ -195,15 +195,15 @@ setup_environment() {
195195
--query "[0].id" -o tsv)
196196

197197
if [ -n "$aiUserRoleExists" ]; then
198-
echo "User already has the Azure AI User role."
198+
echo "User already has the Foundry User role."
199199
else
200-
echo "Assigning Azure AI User role to AI Foundry account..."
200+
echo "Assigning Foundry User role to AI Foundry account..."
201201
az role assignment create \
202202
--assignee "$signed_user_id" \
203203
--role "53ca6127-db72-4b80-b1b0-d745d6d5456d" \
204204
--scope "$foundryExists" \
205205
--output none
206-
echo "Azure AI User role assigned successfully."
206+
echo "Foundry User role assigned successfully."
207207
fi
208208
else
209209
echo "Extracting foundry scope from existing AI project resource ID..."
@@ -223,15 +223,15 @@ setup_environment() {
223223
--query "[0].id" -o tsv)
224224

225225
if [ -n "$aiUserRoleExists" ]; then
226-
echo "User already has the Azure AI User role."
226+
echo "User already has the Foundry User role."
227227
else
228-
echo "Assigning Azure AI User role to foundry account..."
228+
echo "Assigning Foundry User role to foundry account..."
229229
az role assignment create \
230230
--assignee "$signed_user_id" \
231231
--role "53ca6127-db72-4b80-b1b0-d745d6d5456d" \
232232
--scope "$FOUNDRY_SCOPE" \
233233
--output none
234-
echo "Azure AI User role assigned successfully."
234+
echo "Foundry User role assigned successfully."
235235
fi
236236
fi
237237

0 commit comments

Comments
 (0)