New-EntraBetaDirectoryRoleAssignment
Create a new Microsoft Entra ID roleAssignment.
Syntax
Default (Default)
New-EntraBetaDirectoryRoleAssignment
-RoleDefinitionId <String>
-DirectoryScopeId <String>
-PrincipalId <String>
[<CommonParameters>]
Description
The New-EntraBetaDirectoryRoleAssignment
cmdlet creates a new Microsoft Entra role assignment.
In delegated scenarios, the signed-in user must have either a supported Microsoft Entra role or a custom role with the necessary permissions. The minimum roles required for this operation are:
- Privileged Role Administrator
Parameters
-DirectoryScopeId
Specifies the scope for the role assignment.
Parameter properties
Type: | System.String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-PrincipalId
Specifies the principal for role assignment.
Parameter properties
Type: | System.String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-RoleDefinitionId
Specifies the role definition for role assignment.
Parameter properties
Type: | System.String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
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
Microsoft.Open.MSGraph.Model.DirectoryRoleAssignment
Notes
New-EntraBetaRoleAssignment
is an alias for New-EntraBetaDirectoryRoleAssignment
.