PIMActivation: The Ultimate Tool for Microsoft Entra PIM Bulk Role Activation
- Sebastian F. Markdanner
- 14 hours ago
- 5 min read
Getting annoyed or impatient when activating eligible roles in PIM — especially multiple roles at once? You’re not alone. Today, I’m sharing a solution to take the pain out of the process.

Whenever I talk with clients, colleagues, or students about Microsoft Entra Privileged Identity Management (PIM), the first complaint I hear is always the same: activating roles is a headache! After hearing this one too many times, I decided to do something about it.
What started as a quick PowerShell script over the summer ballooned into a full-blown app — complete with a GUI — and it’s now published as a PowerShell module on the PSGallery.
So today, I want to share my solution with you.
Table of Contents
Getting Started With PIMActivation
To start using the app, you’ll need to install it — but first, let’s cover the prerequisites.
Prerequisites
Required Software
Windows 10/11 or Windows Server 2016+
PowerShell 7+ (Installation Guide)
Required User Permissions
Entra ID Permissions:
Eligible for at least one PIM role
Permission to read directory information
Permission to activate PIM roles
Required Delegated Graph API Permissions
Directory.Read.All
PrivilegedAccess.ReadWrite.AzureADGroup
RoleManagementPolicy.Read.AzureADGroup
Policy.Read.ConditionalAccess
Installing PIMActivation
With the prerequisites out of the way, let’s get the app installed. There are two ways to do it:
PowerShell Gallery (Recommended)
# Install for current user
Install-Module -Name PIMActivation -Scope CurrentUser -Force
# Or install system-wide (requires admin)
Install-Module -Name PIMActivation -Scope AllUsers -Force
# Import the module
Import-Module PIMActivation
GitHub @ PIMActivation
# Clone the repository
git clone https://github.com/Noble-Effeciency13/PIMActivation.git
cd PIMActivation
# Import the module
Import-Module .\PIMActivation.psd1 -Force
First Run Experience
To get started, open a new PowerShell 7 session and run:
# Import the module
Import-Module PIMActivation
# Start the app
Start-PIMActivation
No elevated session is required.
The first time you run the app, you’ll be prompted to authenticate and grant consent for the required Graph API permissions.
PIMActivation uses the Microsoft Graph Command Line Tools (formerly Microsoft Graph PowerShell) Enterprise application with delegated permissions, which helps maintain security while letting users manage their own PIM roles.
If you’ve never used these tools before, you’ll be prompted twice — once for the default permissions and once for the app’s custom requirements.
After consent, the app will fetch your active and eligible roles, as well as their policy settings, and then launch the GUI. Load times may vary depending on the number of roles.
PIMActivation Features
The Microsoft Entra PIM role activation tool PIMActivation supports all major configuration requirements for Entra PIM roles — including MFA, Authentication Context, Approvals, and Ticketing — and it handles them effortlessly in both single and bulk activations.
Full GUI Walkthrough
The GUI gives you a quick overview of both active roles and eligible roles, with clear indicators for any requirements — color-coded and detailed.

Active Roles Panel
Shows:
Active role names
Expiration time
Assignment type (direct or group)
Scope
Eligible Roles Panel
Displays the following info for each role:
Field | Description |
Role Name | Display name of the eligible role |
Scope | Directory or Administrative Unit (Azure scopes coming soon!) |
MemberType | Member/Owner (for groups), Direct/Group (for Entra roles) |
Max Duration | Maximum allowed activation time |
MFA | Whether MFA is required |
Auth Context | Requires re-authentication |
Justification | Requires a reason for activation |
Ticket | Requires a ticket number and system |
Approval | Requires approval |
Pending | Indicates if an approval request is already active |
Refreshing Role Lists
Whenever you activate a role, the Active Roles panel is updated automatically. You can also click the Refresh button at the bottom of the app to manually reload.

Role text color changes based on time remaining, making it easy to spot roles nearing expiration.
Activating Eligible Roles
When you select multiple roles, the app smartly merges their requirements into a single prompt. This avoids repetitive input and keeps things smooth.

A few things to note:
If the chosen duration exceeds what one or more roles allow, only the valid ones will be activated — the rest will throw an error.
Roles requiring Authentication Context will prompt for re-auth once per context ID (with token caching during the session).
Tokens are not cached between sessions, so you’ll be prompted again next time.
Deactivating Roles
Deactivating is just as easy — select one or more active roles and click the orange Deactivate Roles button. You’ll get a confirmation prompt before anything is removed.

All changes — activation, deactivation, and refresh — automatically update the UI, even if something fails.
Microsoft Entra PIM Role Activation Tool Usage Examples
Let's go through two scenarios, one for single- & one for bulk role activations, with different requirements.
Start by importing and starting the app in a new PowerShell 7 session:
# Import the module
Import-Module PIMActivation
# Start the app with default parameters - Includes Entra ID & Group roles
Start-PIMActivation
# Or start the app with custom parameters - Example only includes Group roles
Start-PIMActivation -IncludeEntraRoles:$false
Single Role Activation
Choose your role and duration time and click the Activate Role button.
Fill out the required info (justification, ticket, etc.)
If needed, complete Authentication Context re-auth prompts.
Wait for the progress bar to finish.
Done — The role is now active and visible.
Bulk Role Activation
Select multiple roles and pick a common duration and click the Activate Roles button.
Enter all the required info — it’ll be applied across the board.
Complete Authentication Context re-auth prompts (grouped by context).
Wait for the progress bar to finish.
Done — roles are now active and visible.
Final Thoughts: PIM, made easy!
Whether you’re managing a single role or juggling several, the PIMActivation tool is designed to take the frustration out of Privileged Identity Management. By simplifying role activations, handling complex policy requirements, and providing a clean, intuitive interface — this tool aims to save you time and reduce the headache that often comes with PIM.
So I urge you to install the module and start activating!
I’m continuing to improve the module based on feedback and real-world use, so if you have suggestions, bug reports, or want to contribute — head over to the GitHub repo and let me know!
If this tool made your PIM experience just a bit smoother, consider starring the project or dropping me a note in the Discussions. You can also check out the Wiki for more examples, troubleshooting help or contribution guidance.
What’s Next?
Future updates are in the works, including support for:
Azure Resource Roles: Support for Azure subscription and resource-level PIM roles
Profile Management: Save and quickly activate frequently used role combinations and accounts
Scheduling: Plan role activations for future times
Enhanced Reporting: Built-in activation history and analytics
Thanks for reading — and remember: Just-In-Time doesn’t have to mean Just-A-Nuisance.