Skip to content

Commit 78ac4fe

Browse files
Merge pull request #851 from microsoft/PSL-US-43670
refactor: Updated Foundry Roles name
2 parents 1205126 + 7953f6a commit 78ac4fe

6 files changed

Lines changed: 20 additions & 20 deletions

File tree

docs/LocalDevelopmentSetup.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -441,22 +441,22 @@ az role assignment create `
441441
--scope "/subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.Storage/storageAccounts/<storage>"
442442
```
443443
444-
### Azure AI User Access Denied
444+
### Foundry User Access Denied
445445
446-
The local dev script assigns the Azure AI User role automatically. If you still encounter issues, add manually:
446+
The local dev script assigns the Foundry User role automatically. If you still encounter issues, add manually:
447447
448448
```bash
449449
# Linux/macOS
450450
az role assignment create \
451-
--role "Azure AI User" \
451+
--role "Foundry User" \
452452
--assignee $(az ad signed-in-user show --query id -o tsv) \
453453
--scope /subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.CognitiveServices/accounts/<ai-foundry-account>
454454
```
455455
456456
```powershell
457457
# Windows PowerShell
458458
az role assignment create `
459-
--role "Azure AI User" `
459+
--role "Foundry User" `
460460
--assignee (az ad signed-in-user show --query id -o tsv) `
461461
--scope "/subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.CognitiveServices/accounts/<ai-foundry-account>"
462462
```

infra/main.bicep

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ module aiFoundryAiServices 'br/public:avm/res/cognitive-services/account:0.14.2'
618618
}
619619
roleAssignments: [
620620
{
621-
roleDefinitionIdOrName: '53ca6127-db72-4b80-b1b0-d745d6d5456d' // Azure AI User
621+
roleDefinitionIdOrName: '53ca6127-db72-4b80-b1b0-d745d6d5456d' // Foundry User
622622
principalId: userAssignedIdentity.outputs.principalId
623623
principalType: 'ServicePrincipal'
624624
}
@@ -633,7 +633,7 @@ module aiFoundryAiServices 'br/public:avm/res/cognitive-services/account:0.14.2'
633633
principalType: 'ServicePrincipal'
634634
}
635635
{
636-
roleDefinitionIdOrName: '53ca6127-db72-4b80-b1b0-d745d6d5456d' // Azure AI User for deployer
636+
roleDefinitionIdOrName: '53ca6127-db72-4b80-b1b0-d745d6d5456d' // Foundry User for deployer
637637
principalId: deployer().objectId
638638
}
639639
]

infra/main_custom.bicep

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ module aiFoundryAiServices 'br/public:avm/res/cognitive-services/account:0.14.2'
658658
}
659659
roleAssignments: [
660660
{
661-
roleDefinitionIdOrName: '53ca6127-db72-4b80-b1b0-d745d6d5456d' // Azure AI User
661+
roleDefinitionIdOrName: '53ca6127-db72-4b80-b1b0-d745d6d5456d' // Foundry User
662662
principalId: userAssignedIdentity.outputs.principalId
663663
principalType: 'ServicePrincipal'
664664
}
@@ -673,7 +673,7 @@ module aiFoundryAiServices 'br/public:avm/res/cognitive-services/account:0.14.2'
673673
principalType: 'ServicePrincipal'
674674
}
675675
{
676-
roleDefinitionIdOrName: '53ca6127-db72-4b80-b1b0-d745d6d5456d' // Azure AI User for deployer
676+
roleDefinitionIdOrName: '53ca6127-db72-4b80-b1b0-d745d6d5456d' // Foundry User for deployer
677677
principalId: deployer().objectId
678678
}
679679
]

infra/modules/deploy_foundry_role_assignment.bicep

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ param principalType string = 'ServicePrincipal'
2323

2424
// ========== Role Definitions ========== //
2525

26-
// Azure AI User role - for AI Foundry project access (used by AIProjectClient for image generation)
26+
// Foundry User role - for AI Foundry project access (used by AIProjectClient for image generation)
2727
resource azureAiUserRole 'Microsoft.Authorization/roleDefinitions@2022-04-01' existing = {
2828
name: '53ca6127-db72-4b80-b1b0-d745d6d5456d'
2929
}
@@ -48,7 +48,7 @@ resource existingAiProject 'Microsoft.CognitiveServices/accounts/projects@2025-1
4848

4949
// ========== Role Assignments ========== //
5050

51-
// Azure AI User role assignment - same as reference accelerator
51+
// Foundry User role assignment - same as reference accelerator
5252
// Required for AIProjectClient (used for image generation in Foundry mode)
5353
resource assignAzureAiUserRole 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
5454
name: guid(existingAiServices.id, principalId, azureAiUserRole.id)

scripts/local_dev.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ function Ensure-AzureLogin {
102102
}
103103

104104
function Ensure-AzureAIUserRole {
105-
Write-Info "Checking Azure AI User role..."
105+
Write-Info "Checking Foundry User role..."
106106

107107
# Get env vars
108108
$existingProjectId = $null
@@ -135,15 +135,15 @@ function Ensure-AzureAIUserRole {
135135
$existing = az role assignment list --assignee $signedUserId --role $roleId --scope $scope --query "[0].id" -o tsv 2>$null
136136

137137
if ($existing) {
138-
Write-Success "Azure AI User role already assigned."
138+
Write-Success "Foundry User role already assigned."
139139
} else {
140-
Write-Info "Assigning Azure AI User role..."
140+
Write-Info "Assigning Foundry User role..."
141141
az role assignment create --assignee $signedUserId --role $roleId --scope $scope --output none 2>$null
142142
if ($LASTEXITCODE -ne 0) {
143-
Write-Error "Failed to assign Azure AI User role."
143+
Write-Error "Failed to assign Foundry User role."
144144
exit 1
145145
}
146-
Write-Success "Azure AI User role assigned."
146+
Write-Success "Foundry User role assigned."
147147
}
148148
}
149149

scripts/local_dev.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ ensure_azure_login() {
100100
}
101101

102102
ensure_azure_ai_user_role() {
103-
print_info "Checking Azure AI User role..."
103+
print_info "Checking Foundry User role..."
104104

105105
local existing_project_id=""
106106
local foundry_resource_id=""
@@ -131,14 +131,14 @@ ensure_azure_ai_user_role() {
131131
existing=$(MSYS_NO_PATHCONV=1 az role assignment list --assignee "$signed_user_id" --role "$role_id" --scope "$scope" --query "[0].id" -o tsv 2>/dev/null)
132132

133133
if [ -n "$existing" ]; then
134-
print_success "Azure AI User role already assigned."
134+
print_success "Foundry User role already assigned."
135135
else
136-
print_info "Assigning Azure AI User role..."
136+
print_info "Assigning Foundry User role..."
137137
if ! MSYS_NO_PATHCONV=1 az role assignment create --assignee "$signed_user_id" --role "$role_id" --scope "$scope" --output none 2>/dev/null; then
138-
print_error "Failed to assign Azure AI User role."
138+
print_error "Failed to assign Foundry User role."
139139
exit 1
140140
fi
141-
print_success "Azure AI User role assigned."
141+
print_success "Foundry User role assigned."
142142
fi
143143
}
144144

0 commit comments

Comments
 (0)