Support for AzureADMSPrivilegedSchedule in PowerShell 7 with AzureADPreview module?

Brian Kaiser 1 Reputation point
2021-12-17T15:16:45.653+00:00

Is there support for the Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedSchedule .NET class in PowerShell 6/7? When I try to create a schedule object when using the Open-AzureADMSPrivilegedRoleAssignmentRequest cmdlet with the latest version of the AzureADPreview module in PowerShell 7.2.1, I get an error that the type could not be found.

Using a schedule object is the only documented way I've seen to using this cmdlet: https://learn.microsoft.com/en-us/powershell/module/azuread/open-azureadmsprivilegedroleassignmentrequest?view=azureadps-2.0-preview#example-1

158631-image.png

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,258 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Brian Kaiser 1 Reputation point
    2022-07-11T16:53:02.607+00:00

    While it's still unclear if support for [Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedSchedule] will be added for PowerShell 7, an alternative is to use the Microsoft Graph PowerShell SDK module. This module uses [MicrosoftGraphUnifiedRoleAssignmentScheduleRequest] instead (documentation), which does work within PowerShell 7. Additionally, consider using Justin Grote's JAz.PIM module (Github, PowerShell Gallery) instead for activating Azure AD role and resource PIM requests from PowerShell.

    0 comments No comments