Skip to content

Commit cb62138

Browse files
[Synapse]update new role assignment cmdlet help doc (#21756)
* update new role assignment cmdlet help doc * Update ChangeLog.md Documentational changes do not need a change log. --------- Co-authored-by: Yeming Liu <[email protected]>
1 parent 737607b commit cb62138

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Synapse/Synapse/help/New-AzSynapseRoleAssignment.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ The cmdlet may call below Microsoft Graph API according to input parameters:
7979

8080
>[!Note]
8181
> To create a role assignment for a service principal, pass the object ID of the principal in the ObjectId parameter.
82+
> When you are a user with permission to manage Azure RBAC role assignment on the workspace but not a Synapse Administrator, please create Synapse Administrator role by **-RoleDefinitionId** and **-ObjectId** directly but not by **-RoleDefinitionName**, for Synapse Administrator, RoleDefinitionId is "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78", please take below Example 5 as reference. The reason for this is , when you try to add a "Synapse Administrator" role, the cmdlet needs to get the role ID from the role name which requires workspace read permission, which the current user does not have.
8283
8384
## EXAMPLES
8485

@@ -111,6 +112,14 @@ $ws | New-AzSynapseRoleAssignment -RoleDefinitionName ContosoRole -SignInName Co
111112

112113
This command assigns ContosoRole to the user whose principal name is ContosoName through pipeline.
113114

115+
### Example 5
116+
```powershell
117+
$ws = Get-AzSynapseWorkspace -Name ContosoWorkspace
118+
$ws | New-AzSynapseRoleAssignment -RoleDefinitionId "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78" -ObjectId ContosoObjectId
119+
```
120+
121+
This command assigns Synapse Administrator role to the user whose object Id is ContosoObjectId through pipeline.
122+
114123
## PARAMETERS
115124

116125
### -AsJob

0 commit comments

Comments
 (0)