Get-AzSynapseRoleAssignment
Gets a Synapse Analytics role assignment.
Syntax
GetByWorkspaceNameAndNameParameterSet (Default)
Get-AzSynapseRoleAssignment
-WorkspaceName <String>
[-RoleDefinitionName <String>]
[-SignInName <String>]
[-ItemType <WorkspaceItemType>]
[-Item <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
GetByWorkspaceNameAndIdParameterSet
Get-AzSynapseRoleAssignment
-WorkspaceName <String>
[-RoleDefinitionName <String>]
[-ObjectId <String>]
[-ItemType <WorkspaceItemType>]
[-Item <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
GetByWorkspaceNameAndRoleDefinitionIdAndObjectIdParameterSet
Get-AzSynapseRoleAssignment
-WorkspaceName <String>
-RoleDefinitionId <String>
[-ObjectId <String>]
[-ItemType <WorkspaceItemType>]
[-Item <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
GetByWorkspaceNameAndAssignmentIdParameterSet
Get-AzSynapseRoleAssignment
-WorkspaceName <String>
-RoleAssignmentId <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
GetByWorkspaceNameAndServicePrincipalNameParameterSet
Get-AzSynapseRoleAssignment
-WorkspaceName <String>
[-RoleDefinitionName <String>]
[-ServicePrincipalName <String>]
[-ItemType <WorkspaceItemType>]
[-Item <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
GetByWorkspaceObjectAndNameParameterSet
Get-AzSynapseRoleAssignment
-WorkspaceObject <PSSynapseWorkspace>
-SignInName <String>
[-RoleDefinitionName <String>]
[-ItemType <WorkspaceItemType>]
[-Item <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
GetByWorkspaceObjectAndIdParameterSet
Get-AzSynapseRoleAssignment
-WorkspaceObject <PSSynapseWorkspace>
[-RoleDefinitionName <String>]
[-ObjectId <String>]
[-ItemType <WorkspaceItemType>]
[-Item <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
GetByWorkspaceObjectAndRoleDefinitionIdAndObjectIdParameterSet
Get-AzSynapseRoleAssignment
-WorkspaceObject <PSSynapseWorkspace>
-RoleDefinitionId <String>
[-ObjectId <String>]
[-ItemType <WorkspaceItemType>]
[-Item <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
GetByWorkspaceObjectAndAssignmentIdParameterSet
Get-AzSynapseRoleAssignment
-WorkspaceObject <PSSynapseWorkspace>
-RoleAssignmentId <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
GetByWorkspaceObjectAndServicePrincipalNameParameterSet
Get-AzSynapseRoleAssignment
-WorkspaceObject <PSSynapseWorkspace>
-ServicePrincipalName <String>
[-RoleDefinitionName <String>]
[-ItemType <WorkspaceItemType>]
[-Item <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzSynapseRoleAssignment cmdlet gets a Azure Synapse Analytics Role Assignment.
If you do not specify a role definition or a user principal name, this cmdlet gets all role assignment.
The cmdlet may call below Microsoft Graph API according to input parameters:
GET /users/{id}
GET /servicePrincipals/{id}
Note
To retrieve a role assignment for a service principal, pass the object ID of the principal in the ObjectId parameter.
Examples
Example 1
Get-AzSynapseRoleAssignment -WorkspaceName ContosoWorkspace
This command gets all role assignments under a workspace.
Example 2
Get-AzSynapseRoleAssignment -WorkspaceName ContosoWorkspace -RoleDefinitionName ContosoRole
This command gets all role assignments under workspace ContosoWorkspace with role name ContosoRole.
Example 3
Get-AzSynapseRoleAssignment -WorkspaceName ContosoWorkspace -RoleDefinitionName ContosoRole -SignInName ContosoName
This command gets a role assignment under workspace ContosoWorkspace with role name ContosoRole and user principal name ContosoName.
Example 4
Get-AzSynapseRoleAssignment -WorkspaceName ContosoWorkspace -RoleDefinitionName ContosoRole -SignInName ContosoName -ItemType ContosoItemType
This command gets role assignments under workspace ContosoWorkspace with role name ContosoRole, user principal name ContosoName and under itemtype ContosoItemtype.
Example 5
Get-AzSynapseRoleAssignment -WorkspaceName ContosoWorkspace -RoleDefinitionName ContosoRole -SignInName ContosoName -ItemType ContosoItemType -Item ContosoItem
This command gets a role assignment under workspace ContosoWorkspace with role name ContosoRole, user principal name ContosoName, ContosoItemType and ContosoItem.
Example 6
$ws = Get-AzSynapseWorkspace -Name ContosoWorkspace
$ws | Get-AzSynapseRoleAssignment
This command gets all role assignments under a workspace through pipeline.
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Item
The item of Azure Synapse workspace.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
GetByWorkspaceNameAndNameParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
GetByWorkspaceNameAndIdParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
GetByWorkspaceNameAndRoleDefinitionIdAndObjectIdParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
GetByWorkspaceNameAndServicePrincipalNameParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
GetByWorkspaceObjectAndNameParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
GetByWorkspaceObjectAndIdParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
GetByWorkspaceObjectAndRoleDefinitionIdAndObjectIdParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
GetByWorkspaceObjectAndServicePrincipalNameParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ItemType
The itemtype of Azure Synapse workspace.
Parameter properties
Type: Microsoft.Azure.Commands.Synapse.Models.SynapseConstants+WorkspaceItemType
Default value: None
Accepted values: ApacheSparkPool, IntegrationRuntime, LinkedService, Credential
Supports wildcards: False
DontShow: False
Parameter sets
GetByWorkspaceNameAndNameParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
GetByWorkspaceNameAndIdParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
GetByWorkspaceNameAndRoleDefinitionIdAndObjectIdParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
GetByWorkspaceNameAndServicePrincipalNameParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
GetByWorkspaceObjectAndNameParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
GetByWorkspaceObjectAndIdParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
GetByWorkspaceObjectAndRoleDefinitionIdAndObjectIdParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
GetByWorkspaceObjectAndServicePrincipalNameParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ObjectId
The Microsoft Entra ObjectId of the User, Group or Service Principal.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: Id, PrincipalId
Parameter sets
GetByWorkspaceNameAndIdParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
GetByWorkspaceNameAndRoleDefinitionIdAndObjectIdParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
GetByWorkspaceObjectAndIdParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
GetByWorkspaceObjectAndRoleDefinitionIdAndObjectIdParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RoleAssignmentId
The ID of the role assignment.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
GetByWorkspaceNameAndAssignmentIdParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
GetByWorkspaceObjectAndAssignmentIdParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RoleDefinitionId
Id of the Role that is assigned to the principal.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
GetByWorkspaceNameAndRoleDefinitionIdAndObjectIdParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
GetByWorkspaceObjectAndRoleDefinitionIdAndObjectIdParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RoleDefinitionName
Name of the Role that is assigned to the principal.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
GetByWorkspaceNameAndNameParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
GetByWorkspaceNameAndIdParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
GetByWorkspaceNameAndServicePrincipalNameParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
GetByWorkspaceObjectAndNameParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
GetByWorkspaceObjectAndIdParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
GetByWorkspaceObjectAndServicePrincipalNameParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ServicePrincipalName
The ServicePrincipalName of the service principal.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
GetByWorkspaceNameAndServicePrincipalNameParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SignInName
The email address or the user principal name of the user.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: Email, UserPrincipalName
Parameter sets
GetByWorkspaceNameAndNameParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WorkspaceName
Name of Synapse workspace.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
GetByWorkspaceNameAndNameParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
GetByWorkspaceNameAndIdParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
GetByWorkspaceNameAndRoleDefinitionIdAndObjectIdParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
GetByWorkspaceNameAndAssignmentIdParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
GetByWorkspaceNameAndServicePrincipalNameParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WorkspaceObject
workspace input object, usually passed through the pipeline.
Parameter properties
Parameter sets
GetByWorkspaceObjectAndNameParameterSet
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
GetByWorkspaceObjectAndIdParameterSet
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
GetByWorkspaceObjectAndRoleDefinitionIdAndObjectIdParameterSet
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
GetByWorkspaceObjectAndAssignmentIdParameterSet
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
GetByWorkspaceObjectAndServicePrincipalNameParameterSet
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs