您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

Open-AzureADMSPrivilegedRoleAssignmentRequest

Create a role assignment request

Syntax

Open-AzureADMSPrivilegedRoleAssignmentRequest
    -ProviderId <String>
    -ResourceId <String>
    -RoleDefinitionId <String>
    -SubjectId <String>
    -Type <String>
    -AssignmentState <String>
    -Schedule <AzureADMSPrivilegedSchedule>
    [-Reason <String>]
    [<CommonParameters>]

Description

Create a role assignment request

Examples

Example 1

PS C:\> $schedule = New-Object Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedSchedule
				  PS C:\> $schedule.Type = "Once"
				  PS C:\> $schedule.StartDateTime = "2019-04-26T20:49:11.770Z"
				  PS C:\> $schedule.endDateTime = "2019-07-25T20:49:11.770Z"
				  PS C:\> Open-AzureADMSPrivilegedRoleAssignmentRequest -ProviderId AzureResources -Schedule $schedule -ResourceId "e5e7d29d-5465-45ac-885f-4716a5ee74b5" -RoleDefinitionId "9f8c1837-f885-4dfd-9a75-990f9222b21d" -SubjectId "a25004a3-eceb-4ad4-b4aa-9485356bc55b" -AssignmentState "Eligible" -Type "AdminAdd"

Create a role assignment request

Parameters

-AssignmentState

The state of assignment. The value can be Eligible and Active. Required.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ProviderId

The unique identifier of the specific provider

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False
-Reason

The reason needs to be provided for the role assignment request for audit and review purpose.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ResourceId

The unique identifier of the specific resource

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RoleDefinitionId

The ID of the role definition. Required.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Schedule

The schedule of the role assignment request. For request type of UserAdd, AdminAdd, AdminUpdate, and AdminExtend, it is required.

Type:AzureADMSPrivilegedSchedule
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SubjectId

The ID of the subject. Required.

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

The request type. The value can be AdminAdd, UserAdd, AdminUpdate, AdminRemove, UserRemove, UserExtend, UserRenew, AdminRenewand AdminExtend. Required.

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

Inputs

String

Outputs

Object