Skip to content

Quantum: add az quantum workspace user list command - #10215

Draft
Konstantin Averkiev (kaverkiev) wants to merge 22 commits into
Azure:mainfrom
kaverkiev:v-kaverkiev/workspace-user-list
Draft

Quantum: add az quantum workspace user list command#10215
Konstantin Averkiev (kaverkiev) wants to merge 22 commits into
Azure:mainfrom
kaverkiev:v-kaverkiev/workspace-user-list

Conversation

@kaverkiev

@kaverkiev Konstantin Averkiev (kaverkiev) commented Aug 13, 2026

Copy link
Copy Markdown

🤖 PR Validation — ⚠️ Review suggested

Breaking Changes
⚠️ None
⚠️Azure CLI Extensions Breaking Change Test
⚠️quantum
rule cmd_name rule_message suggest_message
⚠️ 1001 - CmdAdd quantum workspace user list cmd quantum workspace user list added

Summary

Adds az quantum workspace user list to list the users (user principals) with access to an Azure Quantum workspace. To match the Azure Quantum portal, only user principals are listed — groups and service principals are excluded. Supports --role (defaults to Quantum Workspace Data Contributor) and --include-inherited (to also include access inherited from the parent resource group/subscription).

Details

Lists Azure RBAC role assignments scoped to the workspace.
Supports --assignee, --assignee-object-id, and --role filters (reuses the existing workspace user params).
Adds an opt-in --include-inherited flag to also surface access inherited from the parent resource group and subscription (assignments granted above the workspace scope).

Testing

New unit tests: scope construction, --include-inherited pass-through, and table transformer.
Added a live user list check to the test_workspace_user scenario.
Manually verified against a live workspace (default vs --include-inherited).


This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install azdev required)
  • My extension version conforms to the Extension version schema

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

@azure-client-tools-bot-prd

Copy link
Copy Markdown

Hi Konstantin Averkiev (@kaverkiev),
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in pyproject.toml (or setup.py, if the extension has not migrated yet) as well.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

@kaverkiev Konstantin Averkiev (kaverkiev) changed the title Quantum: Add workspace user list Quantum: add az quantum workspace user list command Aug 13, 2026
Comment thread src/quantum/azext_quantum/operations/workspace.py Outdated
@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

@kaverkiev
Konstantin Averkiev (kaverkiev) marked this pull request as ready for review August 18, 2026 16:28
Copilot AI lite review requested due to automatic review settings August 18, 2026 16:28
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new az quantum workspace user list command to the Quantum extension to enumerate Azure RBAC role assignments relevant to an Azure Quantum workspace, with optional inclusion of inherited (parent-scope) assignments, and updates tests/help/versioning accordingly.

Changes:

  • Added quantum workspace user list command wired to a new list_users operation and a transform_users table transformer.
  • Introduced --include-inherited support and updated help text for the new command.
  • Added unit tests + a live scenario check; bumped extension version and updated HISTORY.rst.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/quantum/setup.py Bumps extension version to 1.0.0b21.
src/quantum/HISTORY.rst Adds release notes entry for the new workspace user list command.
src/quantum/azext_quantum/tests/latest/test_quantum_workspace.py Adds unit tests for scope/flags/transformer and a live scenario assertion for listing users.
src/quantum/azext_quantum/operations/workspace.py Implements list_users() using role assignment listing + filtering.
src/quantum/azext_quantum/commands.py Adds transform_users and registers az quantum workspace user list.
src/quantum/azext_quantum/_params.py Adds --include-inherited argument; updates --role help to cover list behavior.
src/quantum/azext_quantum/_help.py Adds help + examples for quantum workspace user list.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/quantum/azext_quantum/_params.py Outdated
Comment thread src/quantum/azext_quantum/_help.py Outdated
Comment thread src/quantum/azext_quantum/operations/workspace.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

@kaverkiev
Konstantin Averkiev (kaverkiev) marked this pull request as ready for review August 20, 2026 19:16
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

@kaverkiev
Konstantin Averkiev (kaverkiev) marked this pull request as draft August 20, 2026 21:07
@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

Comment thread src/quantum/azext_quantum/operations/workspace.py Outdated
Comment thread src/quantum/azext_quantum/operations/workspace.py Outdated
Comment thread src/quantum/azext_quantum/operations/workspace.py Outdated
Comment thread src/quantum/azext_quantum/tests/latest/test_quantum_workspace.py Outdated
@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants