Requesting access with Azure AD Privileged Identity Management from PowerShell

Using Azure AD Privileged Identity Management (PIM for short) as a method to control access to Azure resource are nice security feature. It makes it more trackable and gives the granted roles for a defined time period. 

You can add approval as a necessary add-on security feature, use MFA or other adjustments. Read more about PIM here.

BUT! it can also feel like a pain in the... if you use it a lot. So I created a small and simple PowerShell script to request the access for me.
In my Github repo you can find the "Req-GlobalAdmin.ps1". It should be fairly easy to change it to other roles. Just play around with the line:

"Get-AzureADMSPrivilegedRoleDefinition -ProviderId aadRoles -ResourceId $TennantID | Where-Object {$_.DisplayName -Match 'Global Administrator'} | Select-Object -ExpandProperty Id"
So the script are located here:

And more info and possibilities are to be found at Microsoft Docs here

Popular posts from this blog

Installing Android on a Hyper-V virtual machine

Quick guide on how to run BgInfo background as Group Policy login

MDT: TimeZoneName and index number list