Azure AD Privileged Identity Management (PIM) Guide

This comprehensive guide will walk you through understanding and implementing Azure AD Privileged Identity Management (PIM) to secure your cloud environment and manage privileged access effectively.

What is Azure AD Privileged Identity Management?

Azure Active Directory (Azure AD) Privileged Identity Management (PIM) is a service that helps you manage, control, and monitor access to important resources in your organization. It's designed to address the challenges of security, compliance, and governance for privileged accounts.

PIM allows you to enforce Just-In-Time (JIT) access, meaning users only have the permissions they need, for the time they need them, and only when they need them. This significantly reduces the risk associated with standing privileged access.

Key Benefits of Using PIM

Core Concepts and Features

Roles vs. Assignments

In Azure AD PIM, we distinguish between roles and assignments.

Eligible vs. Active Assignments

PIM introduces two types of assignments:

Role Activation Workflow

When an eligible user needs to use a privileged role, they go through an activation process:

  1. User requests to activate the role.
  2. They may be required to provide a business justification.
  3. MFA is enforced.
  4. The role is activated for a specific duration.
  5. After the duration, the role assignment reverts to eligible.

Approval Workflows

For critical roles, you can configure approval workflows. This means that when a user requests to activate an eligible role, their request must be approved by designated approvers before activation.

Azure AD PIM Configuration Steps

1. Enable Azure AD PIM

Azure AD PIM is available in Azure AD Premium P2. Ensure your tenant has the appropriate license. You can access PIM through the Azure portal by searching for "Privileged Identity Management".

2. Discover and Inventory Privileged Roles

Identify all roles that grant elevated privileges within your Azure AD and Azure subscriptions. PIM provides tools to help with this.

3. Convert Permanent Assignments to Eligible

For most roles, convert existing permanent assignments to eligible assignments. This is a crucial step in adopting the JIT model.

In the PIM portal, navigate to Azure AD roles or Azure resource roles, select the role, and then go to Assignments. Here, you can manage existing assignments.

4. Configure Role Activation Settings

For each role, define:

This is done by selecting the role, then clicking on Settings and Edit.

5. Set Up Approval Workflows (Optional)

For critical roles, define approvers. Navigate to the role, then Settings > Edit > Approvals. Select users or groups as approvers.

6. Monitor and Audit

Regularly review PIM audit logs and assignment activities. PIM provides extensive logging capabilities within the Azure portal.

You can find audit logs under Privileged Identity Management > Activity.

Example: Configuring Eligible Assignment for a Global Administrator Role

Let's say you want to make the Global Administrator role eligible for a user named "Alice" with a 4-hour activation limit and require a business justification.

  1. Navigate to Azure AD PIM in the Azure portal.
  2. Under Azure AD roles, click Roles.
  3. Search for and select the Global Administrator role.
  4. Click on Assignments, then Add assignments.
  5. Select "Alice" as the member.
  6. Choose Eligible for the assignment type.
  7. Click Next.
  8. On the Settings tab, set the Activation duration to 4 hours.
  9. Ensure Require justification for activation is checked.
  10. Click Assign.

Alice will now see the Global Administrator role in her PIM dashboard and can activate it when needed.

# Example PowerShell snippet to check PIM assignments # Requires the AzureAD module Connect-AzureAD $UserId = "user@yourdomain.com" $RoleTemplateId = "62e90394-77f5-425e-922a-f37913e38d42" # Example for Global Administrator # Get all PIM eligible assignments for a user and role Get-AzureADMSPrivilegedRoleAssignment -ProviderId "adéderivative" -ResourceId "00000000-0000-0000-0000-000000000000" -Filter "resourceId eq '00000000-0000-0000-0000-000000000000' and principalId eq '$UserId'" | Where-Object {$_.roleDefinitionId -eq $RoleTemplateId -and $_.assignmentState -eq "Eligible"} # Note: Actual PIM cmdlets might require AzureADPreview or Microsoft.Graph modules for full functionality. # The above is a simplified representation. For robust management, use Microsoft Graph PowerShell SDK.

Best Practices

Conclusion

Azure AD Privileged Identity Management is a powerful tool for enhancing security and governance. By implementing JIT access and carefully managing privileged roles, organizations can significantly reduce their exposure to security threats and maintain compliance. Start by exploring your current privileged access landscape and gradually migrate to a PIM-managed model.