az quantum workspace user

Note

This reference is part of the quantum extension for the Azure CLI (version 2.73.0 or higher). The extension will automatically install the first time you run an az quantum workspace user command. Learn more about extensions.

Command group 'quantum' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Manage users of an Azure Quantum workspace.

Commands

Name Description Type Status
az quantum workspace user create

Grant a user, group, or service principal access to an Azure Quantum workspace.

Extension Preview
az quantum workspace user delete

Remove a user, group, or service principal's access to an Azure Quantum workspace.

Extension Preview

az quantum workspace user create

Preview

Command group 'quantum' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Grant a user, group, or service principal access to an Azure Quantum workspace.

Assigns the 'Quantum Workspace Data Contributor' role (by default) at the scope of the given (or current) Azure Quantum workspace.

az quantum workspace user create [--acquire-policy-token]
                                 [--assignee]
                                 [--assignee-object-id]
                                 [--assignee-principal-type {ForeignGroup, Group, ServicePrincipal, User}]
                                 [--change-reference]
                                 [--resource-group]
                                 [--role]
                                 [--workspace-name]

Examples

Grant a user access to a workspace using their sign-in name.

az quantum workspace user create -g MyResourceGroup -w MyWorkspace \
    --assignee user@contoso.com

Grant a user access to a workspace using their object id.

az quantum workspace user create -g MyResourceGroup -w MyWorkspace \
    --assignee-object-id 00000000-0000-0000-0000-000000000000

Grant a group access to a workspace using its object id and principal type.

az quantum workspace user create -g MyResourceGroup -w MyWorkspace \
    --assignee-object-id 00000000-0000-0000-0000-000000000000 --assignee-principal-type Group

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--assignee

Represents a user, group, or service principal. Supported formats: object id, user sign-in name, or service principal name.

--assignee-object-id

Use this parameter instead of '--assignee' to bypass Graph API invocation in case of insufficient privileges. This parameter only works with object ids for users, groups, service principals, and managed identities. For managed identities use the principal id. For service principals, use the object id and not the app id.

--assignee-principal-type

Use with '--assignee-object-id' to avoid errors caused by propagation latency in Microsoft Graph.

Property Value
Accepted values: ForeignGroup, Group, ServicePrincipal, User
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--role

Role name or id. For 'create', the role granted to the user; for 'delete', the role assignment to remove. Defaults to the 'Quantum Workspace Data Contributor' role.

--workspace-name -w

Name of the Quantum Workspace. You can configure the default workspace using az quantum workspace set.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az quantum workspace user delete

Preview

Command group 'quantum' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Remove a user, group, or service principal's access to an Azure Quantum workspace.

az quantum workspace user delete [--acquire-policy-token]
                                 [--assignee]
                                 [--assignee-object-id]
                                 [--change-reference]
                                 [--resource-group]
                                 [--role]
                                 [--workspace-name]
                                 [--yes]

Examples

Remove a user's access to a workspace using their sign-in name.

az quantum workspace user delete -g MyResourceGroup -w MyWorkspace \
    --assignee user@contoso.com

Remove a user's access to a workspace using their object id.

az quantum workspace user delete -g MyResourceGroup -w MyWorkspace \
    --assignee-object-id 00000000-0000-0000-0000-000000000000

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--assignee

Represents a user, group, or service principal. Supported formats: object id, user sign-in name, or service principal name.

--assignee-object-id

Use this parameter instead of '--assignee' to bypass Graph API invocation in case of insufficient privileges. This parameter only works with object ids for users, groups, service principals, and managed identities. For managed identities use the principal id. For service principals, use the object id and not the app id.

--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--role

Role name or id. For 'create', the role granted to the user; for 'delete', the role assignment to remove. Defaults to the 'Quantum Workspace Data Contributor' role.

--workspace-name -w

Name of the Quantum Workspace. You can configure the default workspace using az quantum workspace set.

--yes -y

Do not prompt for confirmation.

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False