Share via


RoleAssignmentsClient.CreateRoleAssignment Method

Definition

Create role assignment.

public virtual Azure.Response<Azure.Analytics.Synapse.AccessControl.Models.RoleAssignmentDetails> CreateRoleAssignment (string roleAssignmentId, Guid roleId, Guid principalId, string scope, string principalType = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateRoleAssignment : string * Guid * Guid * string * string * System.Threading.CancellationToken -> Azure.Response<Azure.Analytics.Synapse.AccessControl.Models.RoleAssignmentDetails>
override this.CreateRoleAssignment : string * Guid * Guid * string * string * System.Threading.CancellationToken -> Azure.Response<Azure.Analytics.Synapse.AccessControl.Models.RoleAssignmentDetails>
Public Overridable Function CreateRoleAssignment (roleAssignmentId As String, roleId As Guid, principalId As Guid, scope As String, Optional principalType As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of RoleAssignmentDetails)

Parameters

roleAssignmentId
String

The ID of the role assignment.

roleId
Guid

Role ID of the Synapse Built-In Role.

principalId
Guid

Object ID of the AAD principal or security-group.

scope
String

Scope at which the role assignment is created.

principalType
String

Type of the principal Id: User, Group or ServicePrincipal.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Applies to