Microsoft Entra
A group of Microsoft multicloud identity and access solutions.
2,576 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
In the middle of finishing an audit. Looking for ways to script the start/end time of assigned roles whether then doing manual. I’m not finding any documentation specifically geared towards.
Hi @Marvin ,
Yes, you can use Powershell to set the StartDateTime and EndDateTime.
Example:
$schedule = New-Object Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedSchedule
$schedule.Type = "Once"
$schedule.StartDateTime = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss.fffZ")
$schedule.endDateTime = "2020-07-25T20:49:11.770Z"
This is covered in the PowerShell for Azure AD roles in Privileged Identity Management guide. I couldn't find an official example that shows how to do this in bulk, but there's a blog post with an example of this here.
Let me know if this helps!