@@ -100,22 +100,40 @@ by discovering the whole Azure subscription.
100100 ` repo:<owner>/<repo>:environment:dev ` . Do not assume branch or
101101 ` pull_request ` subjects without reading the workflow.
1021029 . Before triggering a Foundry prompt-agent workflow, make sure the OIDC app /
103- service principal has Foundry data-plane access. It needs ** Foundry User**
104- (role id ` 53ca6127-db72-4b80-b1b0-d745d6d5456d ` , formerly Azure AI User) at
105- the Foundry project scope, or at the Foundry resource scope if that is the
106- team's standard. Azure ** Reader** is not enough; without this role the eval
107- step fails on
108- ` Microsoft.CognitiveServices/accounts/AIServices/agents/read ` .
109- 10 . If the Foundry RBAC assignment is missing, do not run the workflow yet.
110- Show the exact GitHub OIDC client ID / service principal, desired role, and
111- target Foundry scope, then ask the user to approve the role assignment or
103+ service principal has ** two** RBAC assignments. Both are required; the eval
104+ step fails silently (every metric returns ` null ` ) if only one is in place.
105+ 1 . ** Foundry User** on the Foundry project (or the Foundry resource scope
106+ if that is the team's standard). Role id
107+ ` 53ca6127-db72-4b80-b1b0-d745d6d5456d ` (formerly Azure AI User). Without
108+ this the candidate-staging step fails on
109+ ` Microsoft.CognitiveServices/accounts/AIServices/agents/read ` .
110+ 2 . ** Cognitive Services OpenAI User** on the underlying Azure AI Services
111+ account that hosts the evaluator model deployment
112+ (typically the parent account of the Foundry project). Role id
113+ ` 5e0bd9bd-7b93-4f28-af87-19fc36ad61bd ` . Without this the Foundry
114+ ` azure_ai_evaluator ` graders fail with a 401 ` PermissionDenied ` on
115+ ` Microsoft.CognitiveServices/accounts/OpenAI/deployments/chat/completions/action `
116+ and every metric comes back ` null ` in the cloud eval report. AgentOps now
117+ lifts that error into ` results.json ` and the orchestrator's "0 usable
118+ metric scores" warning so the cause is visible in CI logs, but the
119+ workflow still fails the gate. Grant this role ** before** the first run.
120+ Azure ** Reader** is not enough for either step.
121+ 10 . If either RBAC assignment is missing, do not run the workflow yet.
122+ Show the exact GitHub OIDC client ID / service principal, desired role,
123+ target scope (project for Foundry User, AI Services account for Cognitive
124+ Services OpenAI User), then ask the user to approve the role assignment or
112125 get an Azure/Foundry admin to grant it. After assignment, read it back or ask
113126 the user to confirm before dispatching the workflow.
114- When the user approves and you know the Foundry scope , use the role id to
115- avoid rename drift:
127+ When the user approves and you know the scopes , use the role ids to avoid
128+ rename drift:
116129 - ` az ad sp show --id <AZURE_CLIENT_ID> --query id -o tsv `
117130 - ` az role assignment list --assignee <sp-object-id> --scope <foundry-scope> --include-inherited `
118131 - ` az role assignment create --assignee-object-id <sp-object-id> --assignee-principal-type ServicePrincipal --role 53ca6127-db72-4b80-b1b0-d745d6d5456d --scope <foundry-scope> `
132+ - ` az role assignment create --assignee-object-id <sp-object-id> --assignee-principal-type ServicePrincipal --role 5e0bd9bd-7b93-4f28-af87-19fc36ad61bd --scope <ai-services-account-scope> `
133+ The AI Services account scope looks like
134+ ` /subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.CognitiveServices/accounts/<ai-account-name> `
135+ and can be derived from
136+ ` az cognitiveservices account list --resource-group <foundry-project-rg> --query "[?kind=='AIServices'].id" -o tsv ` .
11913711 . Ask before creating or updating GitHub repos, GitHub environments,
120138 variables/secrets, Entra app registrations/service principals, federated
121139 credentials, managed identities, or Azure RBAC assignments.
@@ -304,11 +322,21 @@ Then configure Workload Identity Federation on the Azure side
304322environment** the workflows will run from. See
305323` docs/ci-github-actions.md ` for the exact ` az ` commands.
306324
307- Also grant the same app registration / service principal ** Foundry User** on the
308- Foundry project or Foundry resource before the first workflow run. The PR gate
309- uses Foundry data-plane APIs to read prompt agents; Azure ` Reader ` only proves
310- ARM access and will still fail the eval step with
311- ` Microsoft.CognitiveServices/accounts/AIServices/agents/read ` .
325+ Also grant the same app registration / service principal ** two** Azure
326+ RBAC roles before the first workflow run; both are required and the eval
327+ step fails silently (every metric returns ` null ` ) if only one is in place:
328+
329+ 1 . ** Foundry User** on the Foundry project or Foundry resource. The PR gate
330+ uses Foundry data-plane APIs to read prompt agents; Azure ` Reader ` only
331+ proves ARM access and will still fail the eval step with
332+ ` Microsoft.CognitiveServices/accounts/AIServices/agents/read ` .
333+ 2 . ** Cognitive Services OpenAI User** on the underlying Azure AI Services
334+ account that hosts the evaluator model deployment. Without this, Foundry
335+ ` azure_ai_evaluator ` graders fail with a 401 ` PermissionDenied ` on the
336+ OpenAI ` chat/completions/action ` data action and every metric returns
337+ ` null ` in the cloud eval report. AgentOps surfaces that error in
338+ ` results.json ` and the orchestrator's "0 usable metric scores" warning,
339+ but the workflow still fails the gate — fix the role before the run.
312340
313341Tell the user that CI evals emit ` agentops.eval.* ` telemetry and scheduled
314342Doctor runs emit ` agentops.agent.finding.* ` telemetry when App Insights is
@@ -319,7 +347,11 @@ Monitor deep links.
319347
320348Already done in Step 2 - the ` agentops-azure ` service connection
321349handles auth. Make sure the underlying service principal or managed
322- identity has the ** Foundry User** role on the Foundry project or resource.
350+ identity has ** both** the ** Foundry User** role on the Foundry project (or
351+ Foundry resource) ** and** the ** Cognitive Services OpenAI User** role on the
352+ underlying Azure AI Services account that hosts the evaluator model. Both
353+ are required; without the OpenAI User role the Foundry graders fail with a
354+ 401 ` PermissionDenied ` and every cloud eval metric returns ` null ` .
323355
324356## Step 4 - Use azd for deployment
325357
0 commit comments