Eligible, Not Active: Why PIM-Enabled Groups Are the Right Way to Hold a Role
Enabling businesses to self-secure providing enterprise-grade security practices, regardless of size. Businesses shouldnโt REQUIRE massive IT security teams to keep their business safe.
Privileged access has a shelf-life problem. A role granted for a project, an escalation, or an “I just need it for a week” request rarely gets taken back. Six months later that standing membership is still there – unused, unmonitored, and exactly the kind of foothold an attacker hopes to find. The fix is not better cleanup discipline. The fix is access that expires by design.

NEVER EXPIRES
๐ง๐ต๐ฒ ๐บ๐ผ๐ฑ๐ฒ๐น: ๐ฟ๐ผ๐น๐ฒ๐ ๐ฎ๐๐๐ถ๐ด๐ป๐ฒ๐ฑ ๐๐ผ ๐ฃ๐๐ -๐ฒ๐ป๐ฎ๐ฏ๐น๐ฒ๐ฑ ๐ด๐ฟ๐ผ๐๐ฝ๐
Instead of assigning Entra ID or Azure roles directly to individual users, assign the role to a role-assignable group managed by Privileged Identity Management (PIM). Membership in the group (not the role assignment itself) becomes the control point. This gives you three things direct assignment can’t:
-
๐ข๐ป๐ฒ ๐ฝ๐น๐ฎ๐ฐ๐ฒ ๐๐ผ ๐ด๐ผ๐๐ฒ๐ฟ๐ป. The role is bound to the group once. Who can exercise that role is then governed entirely by PIM’s membership rules: activation limits, approval, MFA, justification, and audit.
-
๐ง๐ถ๐บ๐ฒ-๐ฏ๐ฎ๐๐ฒ๐ฑ ๐ฎ๐ฐ๐ฐ๐ฒ๐๐ ๐ฏ๐ ๐ฑ๐ฒ๐ณ๐ฎ๐๐น๐. PIM membership can require activation for a bounded window (activation is capped at a maximum of eight hours), after which access lapses automatically. Nobody has to remember to remove anyone.
-
๐ ๐ฐ๐น๐ฒ๐ฎ๐ป ๐ฎ๐๐ฑ๐ถ๐ ๐๐ฟ๐ฎ๐ถ๐น. Every activation is logged with who, when, for how long, and why – evidence you can hand to an auditor instead of a spreadsheet of group memberships you hope is current.
๐๐น๐ถ๐ด๐ถ๐ฏ๐น๐ฒ ๐๐. ๐๐ฐ๐๐ถ๐๐ฒ: ๐๐ต๐ฒ ๐ฑ๐ถ๐๐๐ถ๐ป๐ฐ๐๐ถ๐ผ๐ป ๐๐ต๐ฎ๐ ๐บ๐ฎ๐๐๐ฒ๐ฟ๐
PIM supports two assignment states, and the difference is the entire security value:
-
๐๐น๐ถ๐ด๐ถ๐ฏ๐น๐ฒ means the user may hold the access but does not hold it right now. They must activate it (satisfying MFA, justification, and optionally approval) and the access is granted only for the configured duration. When the window closes, the access is gone. This is just-in-time access.
-
๐๐ฐ๐๐ถ๐๐ฒ means the user holds the access continuously. If the assignment also has no end date, it is standing privileged access – functionally identical to the perpetual group memberships PIM exists to eliminate.
Every member and owner of a PIM-enabled group should be ๐๐น๐ถ๐ด๐ถ๐ฏ๐น๐ฒ.
An Active assignment should be a deliberate, documented, time-boxed exception (a break-glass account is the classic example) never the default, and never permanent. The moment someone is added as Active with no expiration, you have quietly recreated the perpetual-access problem behind a PIM label.

member and owner of a PIM-enabled group should be ๐๐น๐ถ๐ด๐ถ๐ฏ๐น๐ฒ.
๐ง๐ฟ๐๐๐, ๐ฏ๐๐ ๐ฎ๐น๐ฒ๐ฟ๐: ๐ฐ๐ฎ๐๐ฐ๐ต๐ถ๐ป๐ด ๐๐ฐ๐๐ถ๐๐ฒ ๐ฎ๐ฑ๐ฑ๐ถ๐๐ถ๐ผ๐ป๐ ๐๐ต๐ฒ๐ป ๐๐ต๐ฒ๐ ๐ต๐ฎ๐ฝ๐ฝ๐ฒ๐ป
Company policy says “Assign eligible only.” Reality says someone with sufficient rights can still add a member or owner as Active – by mistake, for convenience, or maliciously. That gap is closed with monitoring. The following Log Analytics (KQL) query watches the Entra ID audit log for direct group membership changes and is suitable to drive an alert rule (scope the group-name regex to your own PIM-enabled group naming convention):
AuditLogs
| where TimeGenerated > ago(30d)
| where OperationName in ("Add member to group", "Remove member from
group")
| where LoggedByService == "Core Directory"
| extend InitiatedByUser =
tostring(InitiatedBy.user.userPrincipalName)
| where isnotempty(InitiatedByUser)
| extend TargetUser =
tostring(TargetResources[0].userPrincipalName)
| mv-expand mp = TargetResources[0].modifiedProperties
| where tostring(mp.displayName) == "Group.DisplayName"
| extend GroupName = trim('"', coalesce(tostring(mp.newValue),
tostring(mp.oldValue)))
| extend GroupName = iff(isempty(GroupName), trim('"',
tostring(mp.oldValue)), GroupName)
| where GroupName matches regex
@"^PIM-(RoleGroupPattern1|RoleGroupPattern2)"
| project TimeGenerated, OperationName, GroupName, TargetUser,
InitiatedByUser, CorrelationId
| sort by TimeGenerated desc
Two design points worth noting:
-
๐ง๐ต๐ฒ ๐ถ๐๐ป๐ผ๐๐ฒ๐บ๐ฝ๐๐(๐๐ป๐ถ๐๐ถ๐ฎ๐๐ฒ๐ฑ๐๐๐จ๐๐ฒ๐ฟ) ๐ณ๐ถ๐น๐๐ฒ๐ฟ ๐ถ๐ ๐ฑ๐ผ๐ถ๐ป๐ด ๐ฟ๐ฒ๐ฎ๐น ๐๐ผ๐ฟ๐ธ. Legitimate PIM activations are written to the audit log as membership changes initiated by the PIM service (an application identity), not by a user. By keeping only events with a human initiator, the query deliberately ignores normal just-in-time activations and surfaces exactly the events you care about: a person directly adding (or removing) a member outside the PIM workflow – which is how a perpetual Active assignment gets created.
-
๐ง๐ต๐ฒ ๐ด๐ฟ๐ผ๐๐ฝ-๐ป๐ฎ๐บ๐ฒ ๐ฟ๐ฒ๐ด๐ฒ๐ ๐๐ฐ๐ผ๐ฝ๐ฒ๐ ๐๐ต๐ฒ ๐ฎ๐น๐ฒ๐ฟ๐ to the governed groups so the signal stays clean. Adjust this pattern as the set of PIM-enabled groups grows.
Wire this query to an alert rule (5โ15-minute evaluation window) and route it to the security operations channel. Anyone added as an Active member or owner outside PIM now generates a near-real-time signal that can be reviewed against an approved change – or rolled back.

Active Alert Rule
๐ง๐ต๐ฒ ๐ฏ๐ผ๐๐๐ผ๐บ ๐น๐ถ๐ป๐ฒ
PIM-enabled groups with role assignments turn privileged access from a permanent state into a temporary event. Set every member and owner to ๐๐น๐ถ๐ด๐ถ๐ฏ๐น๐ฒ, make Active assignments rare, justified, and expiring, and back the policy with an audit-log alert that catches direct additions the moment they happen. Access that expires on its own, plus a tripwire for the exceptions, beats any cleanup process you will ever run.

๐๐น๐ถ๐ด๐ถ๐ฏ๐น๐ฒ
If this article helped you tighten up your own PIM posture (or made you want to go check your Active assignments right now) let me know with a like, and drop a comment with what you found. I read every one.

๐๐น๐ผ๐๐๐ฎ๐ฟ๐
-
PIM (Privileged Identity Management) – the Entra ID Governance service that manages, time-bounds, and audits privileged access to roles and groups.
-
Role-assignable group – an Entra ID security or Microsoft 365 group created with the role-assignable property, allowing Entra roles to be assigned to the group itself.
-
Eligible assignment – a PIM assignment state where the user may activate access on demand but holds no privileges until activation.
-
Active assignment – a PIM assignment state where the user holds the privileges continuously, with no activation step.
-
Activation – the act of turning an eligible assignment into temporary access, optionally gated by MFA, justification, or approval; always time-bound.
-
Just-in-time (JIT) access – access granted only at the moment it is needed and only for as long as it is needed.
-
Break-glass account – a tightly controlled emergency account exempted from normal controls so administrators are never locked out; the textbook justified Active assignment.
-
Audit log – the Entra ID record of every traceable directory change, including group membership additions and removals.
-
KQL (Kusto Query Language) – the query language used in Log Analytics and Microsoft Sentinel to search and alert on log data.
๐ฅ๐ฒ๐ณ๐ฒ๐ฟ๐ฒ๐ป๐ฐ๐ฒ๐
-
PIM for Groups (concept): https://learn.microsoft.com/en-us/entra/id-governance/privileged-identity-management/concept-pim-for-groups
-
Assign eligibility for a group in PIM: https://learn.microsoft.com/en-us/entra/id-governance/privileged-identity-management/groups-assign-member-owner
-
Configure PIM for Groups settings (MFA, approval, duration): https://learn.microsoft.com/en-us/entra/id-governance/privileged-identity-management/groups-role-settings
-
Activate group membership or ownership in PIM: https://learn.microsoft.com/en-us/entra/id-governance/privileged-identity-management/groups-activate-roles
-
Entra ID audit logs (concept): https://learn.microsoft.com/en-us/entra/identity/monitoring-health/concept-audit-logs
-
Analyze Entra activity logs with Log Analytics: https://learn.microsoft.com/en-us/entra/identity/monitoring-health/howto-analyze-activity-logs-log-analytics
-
Create log search alert rules in Azure Monitor: https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-log
#PrivilegedAccess #EntraID #PIM #ZeroTrust #IdentityGovernance
