Home/Foundations03 of 05

IDAM and PIM Foundations

Granting access is easy. Keeping it correct as people join, move and leave is the hard part. Part A covers identity governance and the joiner, mover, leaver lifecycle. Part B covers Privileged Identity Management, so that admin rights exist only while they are being used.

Level IntermediateReading time about 18 minutesBest before Labs 06, 07 and 08
A

Identity governance and the JML lifecycle

Who should have access, who decided, and is it still right today?

What IDAM means

IAM with governance built in

IDAM (identity and access management) is the term most UK public sector and defence organisations use for the discipline the rest of the industry calls IAM. In practice, IDAM programmes usually put extra weight on identity governance and administration (IGA): controlling the full life of an identity and proving its access was appropriate at every point.

Good governance answers four questions at any time, with evidence:

  1. Who has access to what?
  2. Who approved it, and why?
  3. Is it still needed?
  4. How fast is it removed when it is not?
The authoritative source

The HR system is the single source of truth for people. It knows who has started, changed role or left before IT does. Microsoft Entra supports inbound provisioning from HR systems, so a new starter record can create the account automatically and a leaving date can trigger offboarding.

HR systemauthoritative source Joiner + Account created from HR+ Birthright groups by attribute+ Temporary Access Pass+ MFA registration on day oneGoal: productive on day one Mover + New role's access added− Old role's access removed· Short, time-boxed overlap· Manager confirms the changeGoal: no privilege creep Leaver − Account disabled− Sessions revoked− Groups and licences removed· Data ownership transferredGoal: access ends on time Access reviews run across all three stages to catch what the automation missed.
The joiner, mover, leaver (JML) lifecycle, driven by HR events rather than helpdesk tickets.

Joiner Day one

Trigger
New starter record in HR
Entra features
HR inbound provisioning, dynamic groups, Lifecycle Workflows joiner templates, Temporary Access Pass
Common failure
Access copied from a colleague ("make them like Sam"), bringing every one of Sam's exceptions with it

Mover Role change

Trigger
Department, job title or manager changes in HR
Entra features
Dynamic groups recalculate, access packages with expiry, a targeted access review after the move
Common failure
New access is added but old access is never removed. Long-serving staff end up with the most access.

Leaver Last day

Trigger
Leaving date reached, or an immediate termination
Entra features
Lifecycle Workflows leaver templates, session revocation, licence removal, Lab 06 style automation
Common failure
The account is disabled but refresh tokens stay valid, or shared secrets the person knew are never rotated
Leaver step by step

Disabling is not the same as removing access

A disabled account cannot sign in again, but sessions and tokens issued before the change can stay usable for a while. A complete leaver process does all of the following, in this order.

# Leaver essentials with Microsoft Graph PowerShell (lab tenant only)
$u = Get-MgUser -UserId 'leaver@contoso.example'
Update-MgUser -UserId $u.Id -AccountEnabled:$false     # 1. stop new sign-ins
Revoke-MgUserSignInSession -UserId $u.Id              # 2. invalidate refresh tokens
# 3. remove group memberships and licences
# 4. transfer mailbox, OneDrive and app ownership to the manager
# 5. rotate any shared or service credentials the person knew
Hostile leavers

When someone is dismissed, do steps 1 and 2 before the conversation ends, not after. Lifecycle Workflows has a real-time termination template for exactly this case.

Requesting and certifying access

Access packages and access reviews

Not everything can be granted by attribute. For everything else, use access packages in Entra Entitlement Management: a bundle of groups, apps and sites that a user requests, a named approver signs off, and that expires automatically. Packages can be marked as incompatible with each other, which enforces separation of duties at request time.

Access reviews then ask a person (the user's manager, the resource owner, or the user themselves) to confirm on a schedule that access is still needed. Set reviews to apply results automatically, and decide deliberately what happens if the reviewer does not respond. Lab 08 builds both.

MeasureWhy it mattersHealthy target
Time to deprovisionHow long a leaver keeps accessSame working day, immediate for hostile leavers
Dormant enabled accountsUnwatched footholdsTrending towards zero
Review completion rateWhether certification actually happensClose to 100 per cent, on time
Guests with no recent sign-inExternal access nobody is usingRemoved by review each quarter
Separation of duties conflictsToxic combinations of rolesZero, or each one formally accepted
B

Privileged Identity Management

Admin rights that exist only while they are being used, with a reason and a record.

The core idea

Eligible, not active

Microsoft Entra Privileged Identity Management (PIM) separates being allowed to hold a role from holding it. An administrator is made eligible for a role. When they need it, they activate it for a limited time, meeting whatever conditions the role requires. When the time runs out, the privilege disappears automatically.

AvoidPermanent active

Holds the role around the clock. Only break-glass accounts should look like this.

SometimesTime-bound active

Holds the role for a fixed period, for example a three-day project, then loses it.

DefaultEligible

Holds nothing until they activate, with MFA, a reason and optional approval.

Eligibleno rights right now Activation requestMFA or auth contextjustification, ticket number Approvaloptional, for thehighest-impact roles Activefor a set window, for example 4 to 8 hoursevery action audited Window expires, rights removed automatically
The PIM activation cycle. The account spends almost all of its life in the eligible state.
What PIM covers

Settings you will configure

SettingWhat it controlsSensible starting point
Maximum activation durationHow long one activation lastsUp to 8 hours; shorter for Global Administrator
Require MFA on activationStrong proof at the moment privilege is grantedOn, ideally with a phishing-resistant authentication context
Require justificationA recorded reason for each activationOn for every role
Require approvalA second person signs offOn for Global Administrator and Privileged Role Administrator
Assignment expiryWhether eligibility itself endsExpire, or recertify through access reviews
NotificationsWho is told about activationsSecurity team for every activation of a top-tier role

PIM works for Microsoft Entra roles, Azure resource roles (such as Owner on a subscription) and PIM for Groups, where membership of a group is made just in time. Users who benefit from PIM need Microsoft Entra ID P2 or Microsoft Entra ID Governance licensing.

Try it

How much exposure does just-in-time remove?

Standing privilege is available to an attacker every hour of the year. With PIM, it is only available during activations. Move the sliders to match your environment.

Privileged exposure calculatorHours per year in which a stolen admin credential would carry admin rights
People who hold an admin role today
How often each one actually needs the role
Limited by the role's maximum duration
Standing privilege122,640 h
Just-in-time with PIM8,736 h
93%less time in which a stolen credential is privileged

Standing figure assumes 8,760 hours a year per admin. JIT figure assumes 52 working weeks. It is an illustration, not a risk score.

Pitfalls

Five mistakes that undo PIM

  • Putting break-glass accounts behind PIMEmergency accounts must stay permanently active so they work when PIM, MFA or approvers are unavailable.
  • Removing standing access before eligibility worksMake people eligible and test an activation first. Availability before removal.
  • Eligible foreverEligibility nobody reviews quietly becomes standing access by another name. Recertify it (Lab 08).
  • Long maximum durationsA 24-hour window for Global Administrator is close to standing privilege.
  • Forgetting role-targeted Conditional AccessPolicies that target directory roles apply only while the role is active, so admins between activations fall outside them. Lab 07 explains the effect.