Today, I am Sharing the version 2 of the PIM Admin Report Script.
Reason for this another version is because existing scripts that I have previously shared are broken as Microsoft has made changes to the graph beta API.
If any of my followers are using methods in the below blog posts, they need to switch to this new Script.
Extract Report – Azure AD Privileged Identity Management – Part 1 | Tech Wizard
Extract Report – Azure AD Privileged Identity Management – Part 2 | Tech Wizard
This Script utilize the AzureAD preview module (follow the hyperlink for details)
Install the Module using below Command:
Install-module AzureADPreview
Now download the Script from below GIT Link or PowerShell Gallery
https://www.powershellgallery.com/packages/PIMReportAdminsv2
Install-Script -Name PIMReportAdminsv2
https://github.com/VikasSukhija/Downloads/blob/master/PIMReportAdminsv2.ps1
Run the Script, it will prompt you for TenantID.
How to get TenantID à Log on to https://portal.azure.com
à Azure Active Directory à Properties
Once you will add the tenant id it will ask for the admin credentials to connect to AzureAD and extract all PIM Roles.
It will start extracting all the admins with below fields:
UserPrincipalName :
RoleID : Intune Administrator
AssignmentState : Permanent
StartDateTime :
EndDateTime
Reports (CSV) and logs will be shared in respective folders.
Update your PIM script with this new version of you are using the old version.
Thanks for reading and downloading.
Tech Wizard