az synapse role assignment

Manage Synapse's role assignments.

Commands

az synapse role assignment create

Create a role assignment.

az synapse role assignment delete

Delete role assignments of workspace.

az synapse role assignment list

List role assignments.

az synapse role assignment show

Get a role assignment by id.

az synapse role assignment create

Create a role assignment.

az synapse role assignment create --assignee
                                  --role
                                  --workspace-name
                                  [--subscription]

Examples

Create a role assignment using service principal name.

az synapse role assignment create --workspace-name testsynapseworkspace \
--role "Sql Admin" --assignee sp_name

Create a role assignment using user principal name.

az synapse role assignment create --workspace-name testsynapseworkspace \
--role "Sql Admin" --assignee username@contoso.com

Create a role assignment using objectId of the User, Group or Service Principal.

az synapse role assignment create --workspace-name testsynapseworkspace \
--role "Sql Admin" --assignee 00000000-0000-0000-0000-000000000000

Required Parameters

--assignee

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

--role

The role name/id that is assigned to the principal.

--workspace-name

The workspace name.

Optional Parameters

--subscription

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

az synapse role assignment delete

Delete role assignments of workspace.

az synapse role assignment delete --workspace-name
                                  [--assignee]
                                  [--ids]
                                  [--role]
                                  [--subscription]
                                  [--yes]

Examples

Delete role assignments by role and assignee.

az synapse role assignment delete --workspace-name testsynapseworkspace \
--role "Sql Admin" --assignee sp_name

Delete role assignments by role id/name.

az synapse role assignment delete --workspace-name testsynapseworkspace \
--role "Sql Admin"

Delete role assignments by service principal name.

az synapse role assignment delete --workspace-name testsynapseworkspace \
--assignee sp_name

Delete role assignments by user principal name.

az synapse role assignment delete --workspace-name testsynapseworkspace \
--assignee username@contoso.com

Delete role assignments by objectId of the User, Group or Service Principal.

az synapse role assignment delete --workspace-name testsynapseworkspace \
--assignee 00000000-0000-0000-0000-000000000001

Delete role assignments by ids.

az synapse role assignment delete --workspace-name testsynapseworkspace \
--ids 10000000-0000-0000-0000-10000000-10000000-0000-0000-0000-10000000

Required Parameters

--workspace-name

The workspace name.

Optional Parameters

--assignee

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

--ids

Space-separated role assignment ids. You should not provide --role or --assignee when --ids is provided.

--role

The role name/id that is assigned to the principal.

--subscription

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

--yes -y

Do not prompt for confirmation.

az synapse role assignment list

List role assignments.

az synapse role assignment list --workspace-name
                                [--assignee]
                                [--query-examples]
                                [--role]
                                [--subscription]

Examples

List role assignments.

az synapse role assignment list --workspace-name testsynapseworkspace

List role assignments by role id/name.

az synapse role assignment list --workspace-name testsynapseworkspace \
--role "Sql Admin"

List role assignments by assignee.

az synapse role assignment list --workspace-name testsynapseworkspace \
--assignee sp_name

List role assignments by objectId of the User, Group or Service Principal.

az synapse role assignment list --workspace-name testsynapseworkspace \
--assignee 00000000-0000-0000-0000-000000000000

Required Parameters

--workspace-name

The workspace name.

Optional Parameters

--assignee

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

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--role

The role name/id that is assigned to the principal.

--subscription

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

az synapse role assignment show

Get a role assignment by id.

az synapse role assignment show --id
                                --workspace-name
                                [--query-examples]
                                [--subscription]

Examples

Get a role assignment by id.

az synapse role assignment show --workspace-name testsynapseworkspace \
--id 00000000-0000-0000-0000-000000000000

Required Parameters

--id

Id of the role that is assigned to the principal.

--workspace-name

The workspace name.

Optional Parameters

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--subscription

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