Skip to content

feat(skills) + docs(tutorials): close data-plane RBAC gap that blocked first eval run#224

Merged
placerda merged 2 commits into
developfrom
docs/tutorial-rbac-data-plane
Jun 1, 2026
Merged

feat(skills) + docs(tutorials): close data-plane RBAC gap that blocked first eval run#224
placerda merged 2 commits into
developfrom
docs/tutorial-rbac-data-plane

Conversation

@placerda
Copy link
Copy Markdown
Contributor

@placerda placerda commented Jun 1, 2026

Closes the 401 PermissionDenied that every fresh Foundry workspace
hit on the first agentops eval run because the Foundry portal only
assigns Foundry User at the project scope, which does not cover
Microsoft.CognitiveServices/accounts/OpenAI/deployments/chat/completions/action
on the parent AI Services account where chat completions live.
Subscription Owner does not save you either: its built-in role
definition has actions: ['*'] but dataActions: [].

What changed

Skill (packaged, ships in v0.3.5). The agentops-eval coding-agent
skill gains a new Step 0.5 - Ensure data-plane RBAC on the AI Services
account
that runs before agentops eval analyze. The skill agent now:

  1. Reads AZURE_AI_FOUNDRY_PROJECT_ENDPOINT from
    .azure/<env>/.env or .agentops/.env.
  2. Parses the AI Services account hostname out of the project URL.
  3. Looks up the backing resource group with
    az cognitiveservices account list.
  4. Fetches the signed-in object ID with az ad signed-in-user show.
  5. Runs an idempotent az role assignment create for
    Cognitive Services OpenAI User at the RG scope.

Tutorials (docs, ship immediately on merge). All three quickstarts
gain the same self-contained 'Grant your identity data-plane access to
the AI Services account' section, with the exact error signature and
the one-liner so users running the tutorial manually have parity with
the skill flow:

  • docs/tutorial-prompt-agent-quickstart.md
  • docs/tutorial-hosted-agent-quickstart.md
  • docs/tutorial-end-to-end.md

Plugin sync. plugins/agentops/skills/agentops-eval/SKILL.md
regenerated via scripts/sync-skills.ps1 so the VS Code extension
copy stays identical.

CHANGELOG. Detailed entry added under [Unreleased]; release
notes promotion happens in the next release/v0.3.5 cut.

Validation

  • python -m pytest tests/ -x -q -> 833 passed, 1 skipped.
  • Manually verified on the reporter's tenant: applying
    Cognitive Services OpenAI User at the resource-group scope makes
    agentops eval run succeed on the same workspace that previously
    failed with FAILED_EXECUTION at the grader.

Follow-up

Doctor will eventually run this check pre-flight rather than relying on
skill / tutorial prose - tracked separately, not in this PR.

placerda and others added 2 commits June 1, 2026 16:02
…ortal

Creating a Foundry project through the portal only assigns the user
'Foundry User' at the project scope. That role does not cover OpenAI
data-plane actions on the parent AI Services account, where chat
completions actually live - so every AI-assisted evaluator and every
cloud-eval grader fails with PermissionDenied the first time a fresh
workspace tries to run eval. Subscription Owner is also insufficient
because the built-in Owner role has actions: ['*'] but dataActions: [].

All three tutorials (prompt-agent quickstart, hosted-agent quickstart,
end-to-end) now document the one-time 'az role assignment create' that
grants 'Cognitive Services OpenAI User' at the resource-group scope of
the Foundry account, with the exact error signature so future readers
can self-diagnose if they skipped it. A future AgentOps Doctor check
will detect the missing assignment pre-run; until then, this step is a
documented manual prerequisite.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The agentops-eval coding-agent skill now resolves the Foundry project
endpoint from .azure/<env>/.env or .agentops/.env, looks up the
backing AI Services account + resource group with az cognitiveservices
account list, fetches the signed-in object ID, and runs an idempotent
az role assignment create for 'Cognitive Services OpenAI User' at the
resource-group scope BEFORE 'agentops eval analyze' / 'agentops eval
run'. This mirrors the new manual step added in the same PR to all
three tutorials and keeps the skill experience aligned: users running
the skill against a fresh Foundry project no longer hit the 401
PermissionDenied that the portal's default 'Foundry User'-at-project
assignment leaves behind. CHANGELOG entry added under [Unreleased].

Plugin skills mirror under plugins/agentops/skills/ regenerated via
scripts/sync-skills.ps1 to keep the VS Code extension copy identical.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@placerda placerda changed the title docs(tutorials): document data-plane RBAC step missing from Foundry portal feat(skills) + docs(tutorials): close data-plane RBAC gap that blocked first eval run Jun 1, 2026
@placerda placerda merged commit 6259003 into develop Jun 1, 2026
12 checks passed
@placerda placerda deleted the docs/tutorial-rbac-data-plane branch June 1, 2026 19:17
placerda added a commit that referenced this pull request Jun 1, 2026
* feat(skills) + docs(tutorials): close data-plane RBAC gap that blocked first eval run (#224)

* docs(tutorials): document data-plane RBAC step missing from Foundry portal

Creating a Foundry project through the portal only assigns the user
'Foundry User' at the project scope. That role does not cover OpenAI
data-plane actions on the parent AI Services account, where chat
completions actually live - so every AI-assisted evaluator and every
cloud-eval grader fails with PermissionDenied the first time a fresh
workspace tries to run eval. Subscription Owner is also insufficient
because the built-in Owner role has actions: ['*'] but dataActions: [].

All three tutorials (prompt-agent quickstart, hosted-agent quickstart,
end-to-end) now document the one-time 'az role assignment create' that
grants 'Cognitive Services OpenAI User' at the resource-group scope of
the Foundry account, with the exact error signature so future readers
can self-diagnose if they skipped it. A future AgentOps Doctor check
will detect the missing assignment pre-run; until then, this step is a
documented manual prerequisite.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* feat(skills): preflight data-plane RBAC in agentops-eval skill

The agentops-eval coding-agent skill now resolves the Foundry project
endpoint from .azure/<env>/.env or .agentops/.env, looks up the
backing AI Services account + resource group with az cognitiveservices
account list, fetches the signed-in object ID, and runs an idempotent
az role assignment create for 'Cognitive Services OpenAI User' at the
resource-group scope BEFORE 'agentops eval analyze' / 'agentops eval
run'. This mirrors the new manual step added in the same PR to all
three tutorials and keeps the skill experience aligned: users running
the skill against a fresh Foundry project no longer hit the 401
PermissionDenied that the portal's default 'Foundry User'-at-project
assignment leaves behind. CHANGELOG entry added under [Unreleased].

Plugin skills mirror under plugins/agentops/skills/ regenerated via
scripts/sync-skills.ps1 to keep the VS Code extension copy identical.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chore: prepare release 0.3.5

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant