diff --git a/infra/main.bicep b/infra/main.bicep index 04c4832c10..9c0864db75 100644 --- a/infra/main.bicep +++ b/infra/main.bicep @@ -763,9 +763,7 @@ module openAiRoleSearchService 'core/security/role.bicep' = if (isAzureOpenAiHos scope: openAiResourceGroup name: 'openai-role-searchservice' params: { - principalId: (deploymentTarget == 'appservice') - ? backend.outputs.identityPrincipalId - : acaBackend.outputs.identityPrincipalId + principalId: searchService.outputs.principalId roleDefinitionId: '5e0bd9bd-7b93-4f28-af87-19fc36ad61bd' principalType: 'ServicePrincipal' } @@ -799,9 +797,7 @@ module storageRoleSearchService 'core/security/role.bicep' = if (useIntegratedVe scope: storageResourceGroup name: 'storage-role-searchservice' params: { - principalId: (deploymentTarget == 'appservice') - ? backend.outputs.identityPrincipalId - : acaBackend.outputs.identityPrincipalId + principalId: searchService.outputs.principalId roleDefinitionId: '2a2b9908-6ea1-4ae2-8e65-a410df84e7d1' principalType: 'ServicePrincipal' }