New-AzureADMSRoleAssignment

Creates an Azure AD role assignment.

Syntax

New-AzureADMSRoleAssignment
   -RoleDefinitionId <String>
   -PrincipalId <String>
   -ResourceScope <String>
   [<CommonParameters>]

Description

The New-AzureADMSRoleAssignment cmdlet creates an Azure Active Directory (Azure AD) role assignment.

Examples

Example 1

PS C:\> New-AzureADMSRoleAssignment -RoleDefinitionId 62e90356-69f5-4237-9190-012177145e10 -PrincipalId 69584089-b4d1-4055-9c94-320412efd653 -ResourceScope '/'

This command creates a new role assignment.

Parameters

-PrincipalId

Specifies the principal for role assignment.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceScope

Specifies the resource scope for role assignment.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-RoleDefinitionId

Specifies the role definition for role assignment.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

Object