GraphShell Explorer / Commands / PIM

New-MgRoleManagementDirectoryRoleAssignmentScheduleRequest

Activate an eligible Microsoft Entra ID role through Privileged Identity Management for a limited time.

Module
Microsoft.Graph.Identity.Governance
HTTP
POST v1.0 Stable
REST endpoint
POST https://graph.microsoft.com/v1.0/roleManagement/directory/roleAssignmentScheduleRequests
REST JSON body
{
  "action": "SelfActivate",
  "principalId": "{userId}",
  "roleDefinitionId": "{roleId}",
  "directoryScopeId": "/",
  "scheduleInfo": { "...": "..." },
  "justification": "Incident support"
}
Equivalent Invoke-MgGraphRequest
Invoke-MgGraphRequest `
    -Method POST `
    -Uri "https://graph.microsoft.com/v1.0/roleManagement/directory/roleAssignmentScheduleRequests" `
    -Body $body `
    -ContentType "application/json"

POST /roleManagement/directory/roleAssignmentScheduleRequests (v1.0)

Module: Microsoft.Graph.Identity.Governance

Permissions

Delegated (work or school)

  • RoleAssignmentSchedule.ReadWrite.Directory (least privilege)
  • RoleAssignmentSchedule.Remove.Directory
  • RoleEligibilitySchedule.Remove.Directory
  • RoleManagement.ReadWrite.Directory

Delegated (personal)

Not supported.

Application

  • RoleAssignmentSchedule.ReadWrite.Directory (least privilege)
  • RoleManagement.ReadWrite.Directory
  • RoleAssignmentSchedule.Remove.Directory
  • RoleEligibilitySchedule.Remove.Directory

Source: Microsoft Learn endpoint permissions · Official endpoint documentation

Confirm property-specific permissions, Entra roles, licensing and ownership requirements in the official documentation. SDK metadata outside the verified sample is not independently certified.

Explore New-MgRoleManagementDirectoryRoleAssignmentScheduleRequest