Azure PIM Admin Report Version 2

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

https://techwizard.cloud

https://syscloudpro.com/

PowerShell Cheat Book

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s