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.
This Script utilize the AzureAD preview module (follow the hyperlink for details)
Install the Module using below Command:
Now download the Script from below GIT Link or PowerShell Gallery
Install-Script -Name PIMReportAdminsv2
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:
RoleID : Intune Administrator
AssignmentState : Permanent
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.