GraphShell Translator / 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"
Permissions

Permission information should be confirmed in the official Microsoft documentation.

View official Microsoft documentation