Configure PIM for Entra Roles
Earn 25 points (50 with Pro) in two steps
- ① Read through the lesson — each section gets a ✓ as you scroll through it.
- ② When every section has a ✓, tap Complete lesson.
0 of 11 read · keep scrolling
✦ See fewer ads and earn double points — 50 a lesson instead of 25 — with Pro
Lesson: Configure Privileged Identity Management (PIM) for Entra Roles
Introduction: The Philosophy of Privileged Access
In the modern digital landscape, identity is the new perimeter. Gone are the days when a firewall was sufficient to protect an organization’s assets. Today, an attacker does not need to break through your network defenses if they can simply log in with an administrator’s credentials. Privileged Identity Management (PIM) is the cornerstone of a modern security strategy because it addresses the core vulnerability of administrative accounts: they are always "on."
When an administrator has permanent global access to your cloud environment, that account becomes the single point of failure. If that account is compromised through phishing, credential stuffing, or session hijacking, the attacker gains keys to the kingdom. PIM changes this paradigm by shifting from permanent, standing access to just-in-time (JIT) access. Instead of having administrative rights 24/7, users only receive those rights when they need them, for a specific duration, and with a documented reason.
This lesson explores how to configure PIM for Entra (formerly Azure AD) roles. We will move beyond the basic setup and dive into the mechanics of role eligibility, activation workflows, access reviews, and the security principles that make PIM an essential tool for any organization operating in the cloud. By the end of this guide, you will understand how to transform your identity governance from a static, risky model to a dynamic, controlled, and auditable environment.
Not read yet
The Core Concepts: Eligibility vs. Active Assignment
To understand PIM, you must first distinguish between "Active" and "Eligible" assignments. In a traditional environment, when you assign a user to the "Global Administrator" role, that user is Active. They can perform any action allowed by that role at any moment. This is what we call "Standing Access."
In PIM, we introduce the concept of Eligibility. When you make a user eligible for a role, they do not hold the permissions associated with that role. They are simply authorized to request those permissions when they have a task to perform. This is the fundamental security shift: the surface area for a potential compromise is reduced to near zero during the times when the user is not actively performing administrative tasks.
Comparison: Standing Access vs. Just-in-Time Access
| Feature | Standing Access | Just-in-Time (PIM) |
|---|---|---|
| Permissions | Always active | Active only when requested |
| Risk Exposure | High (24/7 window) | Low (Temporary window) |
| Audit Trail | Minimal | High (Request/Approval logs) |
| User Experience | No friction | Requires activation step |
| Account Security | High risk if compromised | Mitigated by activation controls |
Callout: The "Just-Enough" Principle PIM is not just about time; it is about scope. When configuring PIM, you should always pair Just-in-Time access with the Principle of Least Privilege. Only grant eligibility for the specific role needed to perform a task, rather than broad roles like Global Administrator. If a user only needs to manage password resets, grant them the "Helpdesk Administrator" role, not "User Administrator."
Not read yet
Configuring PIM: Step-by-Step Implementation
Configuring PIM for Entra roles involves several distinct stages. You must first ensure you have the proper licensing (usually Entra ID P2), then define the policies that govern how roles are requested and approved.
Step 1: Enabling PIM for Your Organization
Before you can manage roles, you must activate PIM for your directory. This is typically done through the Entra admin center. Once activated, you will see the "Privileged Identity Management" blade, which serves as your central dashboard for all operations.
Step 2: Defining Role Settings
Role settings define the "rules of the road" for activating a role. These rules apply to anyone requesting that specific role. You should configure these settings differently based on the sensitivity of the role. For example, the requirements to activate "Global Administrator" should be significantly more stringent than those for "Helpdesk Administrator."
- Navigate to PIM: Open the Entra admin center and select "Privileged Identity Management."
- Access Role Settings: Select "Microsoft Entra roles" and then "Settings."
- Choose the Role: Select the specific role (e.g., "User Administrator") you want to configure.
- Configure Activation:
- Maximum duration: Set a reasonable limit (e.g., 4 hours).
- Require MFA: Always require this for sensitive roles.
- Require Justification: Force the user to explain why they need the role.
- Require Ticket Number: If you use a service desk tool (like ServiceNow or Jira), require a reference number.
- Require Approval: Choose one or more approvers who must sign off on the request.
Tip: The "Break-Glass" Account Exception Always ensure you have at least two cloud-only "Break-Glass" accounts with permanent Global Admin access that are excluded from PIM requirements. These accounts should be kept in a secure, offline vault. If your PIM configuration fails or your identity provider experiences an outage, these accounts remain your only path to recovery.
Not read yet
Automating PIM with Microsoft Graph PowerShell
While the graphical interface is excellent for initial setup, managing PIM at scale requires automation. The Microsoft Graph PowerShell SDK allows you to programmatically assign eligibility, audit PIM status, and integrate PIM into your internal security workflows.
Example: Assigning an Eligible Role
To assign a user as eligible for a role using PowerShell, you first need the PrincipalId (the user's object ID) and the RoleDefinitionId.
# Define the parameters
$userId = "your-user-guid-here"
$roleId = "your-role-guid-here"
$scope = "/" # Tenant root scope
# Create an eligible assignment
New-MgRoleManagementDirectoryRoleAssignmentScheduleRequest -RoleDefinitionId $roleId `
-PrincipalId $userId -DirectoryScopeId $scope `
-ScheduleInfo @{
StartDateTime = (Get-Date).ToString("yyyy-MM-ddTHH:mm:ssZ")
Expiration = @{
Type = "AfterDuration"
EndDateTime = "PT8H" # 8 hours duration
}
} -Action "AdminAssign" -Justification "Assigned for project X"
Explanation of the Code
- PrincipalId and RoleDefinitionId: These are unique identifiers for the user and the role. You can retrieve these using
Get-MgUserandGet-MgDirectoryRole. - DirectoryScopeId: This defines where the role applies. Using
/applies it to the entire tenant. - ScheduleInfo: This is the heart of PIM. We define the start time and the expiration type. Setting the type to
AfterDurationensures the assignment is not permanent. - Action: By setting this to
AdminAssign, we are creating an eligible assignment that the user can later activate.
Not read yet
Advanced Workflows: Approval Processes
One of the most powerful features of PIM is the approval workflow. By requiring a second person to approve an activation request, you add a layer of human verification that significantly mitigates the risk of social engineering or unauthorized account usage.
Designing the Approval Chain
When you configure an approval requirement, you have the option to designate specific users or groups as approvers. Best practices suggest the following:
- Use Groups: Instead of assigning individual users as approvers, assign a security group. This allows you to add or remove members from the approval team without reconfiguring every PIM role setting.
- Define Escalation: If the primary approver is unavailable, ensure there is a secondary approver or a group that can handle the request. PIM currently supports a single tier of approval, so choose your approvers wisely.
- Audit Approvals: Every approval decision is logged. Regularly review these logs to ensure that approvers are actually validating the requests and not just clicking "Approve" out of habit.
Warning: The "Approval Fatigue" Trap If you make the approval process too cumbersome, users will find ways to bypass it, or approvers will stop paying attention. If you find your approvers are approving everything without question, the process has failed. Periodically review your approval logs and interview your approvers to ensure they are performing due diligence.
Not read yet
Access Reviews: The Cleanup Crew
Even with PIM, users may accumulate eligibility over time. A user might move departments or finish a project, but their eligibility for a high-privilege role remains. Access Reviews are the automated mechanism within PIM to ensure that only the right people have access to the right roles.
Implementing Access Reviews
You should configure recurring access reviews for all administrative roles. For example, you might set a quarterly review for "User Administrator" and a monthly review for "Global Administrator."
- Create the Review: In the PIM dashboard, select "Access reviews" and "New."
- Select the Scope: Choose the role you want to review.
- Assign Reviewers: You can set the reviewers to be the users themselves (Self-attestation), their managers, or a specific admin.
- Define Actions: If a reviewer denies access or fails to respond, you can configure PIM to automatically remove the role eligibility. This "Auto-apply" feature is critical for maintaining a clean environment.
Why Access Reviews Matter
Without periodic reviews, your directory suffers from "privilege creep." As employees change roles, they often carry their old permissions with them. By enforcing mandatory reviews, you force the business to justify why a user still requires elevated access. This is a primary requirement for most compliance frameworks, such as SOC2, HIPAA, and ISO 27001.
Not read yet
Common Pitfalls and How to Avoid Them
Even with the best intentions, organizations often struggle with PIM implementation. Below are the most common mistakes and strategies to avoid them.
1. Over-Granting Eligibility
Many admins treat "Eligible" as "Permanent." They assign users to every role they might possibly need, effectively creating a list of permanent admins who just have to click a button.
- The Fix: Audit your assignments. If a user hasn't activated a role in 90 days, remove their eligibility.
2. Ignoring MFA Requirements
If you allow a user to activate a role without MFA, you have defeated the entire purpose of PIM. If their password is stolen, the attacker can simply activate the role and take control of your environment.
- The Fix: Use Conditional Access policies to enforce MFA for all PIM activation requests, regardless of the role sensitivity.
3. Relying on Single Approvers
If you only have one person capable of approving requests, that person becomes a bottleneck or a single point of failure if they leave the company.
- The Fix: Always assign a group of at least two or three people as the approval authority for critical roles.
4. Poor Justification Tracking
If your users are entering "test" or "need access" as their justification, you are not maintaining a useful audit trail.
- The Fix: Set a policy that requires a valid ticket number from your ITSM tool. If the ticket number does not exist or is closed, the request should be denied.
Not read yet
Quick Reference: PIM Role Settings Checklist
When configuring a new PIM role, use this checklist to ensure you have covered the necessary security controls.
| Setting | Recommendation |
|---|---|
| MFA Requirement | Always On |
| Justification | Mandatory |
| Approval | Required for all high-impact roles |
| Max Duration | 4 hours (standard), 8 hours (max) |
| Notification | Email/SMS to user and approver |
| Access Review | Quarterly for all roles |
Callout: PIM vs. Conditional Access It is important to understand that PIM and Conditional Access (CA) work together, not in isolation. PIM controls who can be an admin and when. Conditional Access controls where and how they connect (e.g., forcing a compliant device, blocking risky IP addresses). You should always use both to create a layered defense.
Ensuring Compliance and Audit Readiness
For many organizations, the primary driver for implementing PIM is compliance. Auditors want to see proof that you have control over who has access to your systems. PIM provides an immutable audit trail that is invaluable during a security audit.
Extracting Audit Logs
You can export PIM audit logs to a SIEM (like Microsoft Sentinel) or a storage account. These logs contain:
- Who requested the role.
- When the request was made.
- Who approved the request.
- The justification provided.
- The exact time the role was activated and deactivated.
By streaming these logs to a central location, you can create dashboards that visualize your privilege landscape. For instance, you could track the "Average Time to Approval" or "Most Frequently Activated Roles." This data not only satisfies auditors but also helps you optimize your internal processes.
Responding to Security Incidents
In the event of a breach, PIM logs are your best friend. You can quickly see if any administrative roles were activated during the time of the incident. If you see a suspicious activation, you can immediately revoke that user's sessions and disable their account, knowing exactly what damage could have been done.
Not read yet
Best Practices for a Healthy PIM Environment
Implementing PIM is not a "set it and forget it" task. It requires ongoing maintenance to ensure it remains effective as your organization evolves.
- Standardize Role Naming: If your organization uses custom roles, ensure they follow a clear, consistent naming convention. This makes it easier to assign and review them in the PIM interface.
- Regularly Review PIM Policies: As your security posture changes, your PIM policies should change with it. If you find that "User Administrator" is being used for tasks that require "Global Administrator," you may need to adjust your role definitions or create more granular custom roles.
- Train Your Users: The transition to PIM can be frustrating for administrators who are used to instant access. Provide clear documentation and training on how to request access, how to use the PIM portal, and why the new workflow is necessary for security.
- Monitor "Eligible" Assignments: Keep a close eye on your "Eligible" list. This is your "shadow admin" list. If an account is on this list, it has the potential to become a high-privilege account at any time.
Not read yet
FAQ: Common Questions about PIM
Q: Can I use PIM for custom roles? A: Yes, PIM supports both built-in Entra roles and custom administrative roles. This is highly recommended for organizations that need to delegate specific tasks without granting excessive permissions.
Q: Does PIM work with third-party apps? A: PIM is primarily designed for Entra ID roles and Azure resources. For third-party applications, you may need to look into Identity Governance features or use API-based integration to manage access.
Q: What happens if a user's role expiration time passes while they are in the middle of a task? A: The user will lose their permissions immediately. They will need to request an extension or a new activation. This is why it is important to set durations that are long enough for common tasks but short enough to maintain security.
Q: Can I automate the approval process? A: While you can use Logic Apps to process approvals based on certain criteria (e.g., auto-approving if a ticket is marked as "High Priority" in your ITSM), be very careful with this. Automating approvals can create security gaps if not configured correctly.
Not read yet
Conclusion: Key Takeaways
Configuring PIM for Entra roles is an essential step toward achieving a robust identity security posture. By shifting from permanent, standing access to just-in-time, authorized access, you significantly reduce the risk of account compromise and lateral movement within your environment.
To summarize the most critical points of this lesson:
- Eliminate Standing Access: Permanent administrative roles are a massive security liability. Move all administrative users to an "Eligible" status where possible.
- Enforce MFA and Justification: Never allow an administrative role to be activated without multi-factor authentication and a valid, documented business reason.
- Implement Multi-Person Approval: For sensitive roles like Global Administrator, require secondary approval to ensure that no single person can unilaterally escalate their own privileges.
- Automate with Access Reviews: Use periodic access reviews to prune unnecessary eligibility. This keeps your directory clean and ensures you meet compliance requirements for user access audits.
- Monitor and Audit: Treat PIM logs as high-value security data. Feed them into a SIEM and use them to gain visibility into who is doing what and when.
- Prepare for Break-Glass Scenarios: Always maintain offline, permanent administrative accounts that are excluded from PIM to ensure you can recover from a configuration failure or identity provider outage.
- Adopt a "Least Privilege" Mindset: PIM is not just about time; it is about scope. Always assign the smallest set of permissions required for the task at hand.
By applying these principles, you turn your identity infrastructure from a vulnerable target into a controlled, auditable, and highly secure asset. Start small by moving your most sensitive roles into PIM, and then systematically expand your coverage until your entire administrative population is operating under a just-in-time model.
Not read yet
Each section gets a ✓ as you scroll through it. Tap the button to jump to the next one.
- Introduction to Microsoft Entra ID
- Introduction to Microsoft Entra ID Quiz5q
- Configure Tenant Settings
- Configure Tenant Settings Quiz5q
- Custom Domain Names
- Custom Domain Names Quiz5q
- Device Identity and Registration
- Device Identity and Registration Quiz5q
- Company Branding Configuration
- Company Branding Configuration Quiz5q
- Create and Manage User Accounts
- Create and Manage User Accounts Quiz5q
- Bulk User Operations
- Bulk User Operations Quiz5q
- Create and Manage Groups
- Create and Manage Groups Quiz5q
- Dynamic Group Membership
- Dynamic Group Membership Quiz5q
- Administrative Units
- Administrative Units Quiz5q
- License Assignment and Management
- License Assignment and Management Quiz5q
- External Collaboration Settings
- External Collaboration Settings Quiz5q
- Invite External Users
- Invite External Users Quiz5q
- B2B Collaboration and Direct Connect
- B2B Collaboration and Direct Connect Quiz5q
- Cross-Tenant Access Settings
- Cross-Tenant Access Settings Quiz5q
- Identity Provider Configuration
- Identity Provider Configuration Quiz5q
- Microsoft Entra Connect Overview
- Microsoft Entra Connect Overview Quiz5q
- Password Hash Synchronization
- Password Hash Synchronization Quiz5q
- Pass-Through Authentication
- Pass-Through Authentication Quiz5q
- Federation with AD FS
- Federation with AD FS Quiz5q
- Entra Connect Cloud Sync
- Entra Connect Cloud Sync Quiz5q
- Authentication Methods Overview
- Authentication Methods Overview Quiz5q
- Passwordless Authentication
- Passwordless Authentication Quiz5q
- Self-Service Password Reset
- Self-Service Password Reset Quiz5q
- Password Protection and Smart Lockout
- Password Protection and Smart Lockout Quiz5q
- FIDO2 Security Keys
- FIDO2 Security Keys Quiz5q
- Microsoft Authenticator App
- Microsoft Authenticator App Quiz5q
- Conditional Access Overview
- Conditional Access Overview Quiz5q
- Create Conditional Access Policies
- Create Conditional Access Policies Quiz5q
- Named Locations and Terms of Use
- Named Locations and Terms of Use Quiz5q
- Session Controls and App Controls
- Session Controls and App Controls Quiz5q
- Authentication Strength Policies
- Authentication Strength Policies Quiz5q
Spend your points to unlock exam-style practice questions
Spend points to unlock SC-300 exam-style practice questions.
Practice for SC-300