skip to content

In a quarterly access review, how does the management-API audit record tell you which granted permissions a principal has actually used?

level: seniorimportance: should knowfreq 40%

answer

  1. measure instead of asking
  2. granted set minus observed set
  3. collect the refusals separately
  4. window longer than the slowest cycle
  5. operation observed, grant not identified

basics

~10 s

Aggregate the operations each principal performed over a review window and subtract them from the actions its grants allow; the difference is the removal candidate list. The window must exceed the slowest legitimate cycle.

solid answer

~50 s

The record turns an access review from an argument into a measurement. For each principal, aggregate the **operations actually performed** over a window, then subtract that set from the **actions the grants allow**; what is left has been granted and not exercised. Collect denied operations separately — they are either a caller missing a grant it legitimately needs or a caller reaching beyond its remit, and both deserve a look. Three cautions decide whether the output is safe to act on. The window must exceed the slowest honest cycle, or the annual recovery drill and the quarterly close look like dead permissions. Absence of evidence is weak where the relevant operations are not recorded by default. And the record names the *operation*, not the grant that authorised it — removing one grant may leave the access intact through another. Tighten, watch denials for a cycle, then delete.

code

pseudocode · 17 lines
pseudocode
window  = management audit events from the last two quarters
granted = the set of actions the subject's grants allow
used    = empty set
blocked = empty set

for each event in window:
    if event.principal is not subject:
        continue
    if event.result is performed:
        used.add(event.operation)
    else if event.result is denied:
        blocked.add(event.operation)

unusedGrants = granted minus used

report(unusedGrants)   // removal candidates, not decisions
report(blocked)        // missing grant, or reaching too far

go deeper

for a junior

Know that the platform records which operations each identity performed, and that a review compares that against what the identity is allowed to do.

for a middle

Explain the set subtraction — granted minus observed — and why refused operations are collected separately rather than counted as usage.

for a senior

Show the operational judgment: sizing the window against the slowest legitimate cycle, tightening before deleting, and watching denials for a cycle so a mistake announces itself instead of breaking something quietly.

for a principal

The call you own is how much evidence justifies a removal across an organisation, and how to keep the review credible — one reversed removal after an outage turns every future review into a formality.

## Why the record is the right instrument Access reviews fail in a predictable way: a reviewer is shown a list of permissions and asked whether each is still needed, has no way to tell, and approves the lot. The management-event record replaces the guess with an observation. It contains, for the review period, every management operation each principal actually performed, so the question becomes *what has this identity done*, which is checkable, instead of *what might this identity need*, which is not. The comparison is a set subtraction: - **granted** — the actions the principal's permissions allow - **used** — the distinct operations recorded as performed by that principal in the window - **candidates** — `granted` minus `used`, the permissions that exist but have not been exercised - **blocked** — operations the principal attempted and the access model refused, collected separately That last set is the one reviewers forget, and it is the most actionable. A refusal is either a legitimate caller with a missing grant — usually a broken job somebody has been working around — or a caller reaching past its remit. Either way it is a finding, not noise. ## The window is the whole design The single most damaging mistake is a review window shorter than the estate's slowest honest cycle. Real work has periods measured in months: 1. A quarterly financial close that touches an export pipeline four times a year. 2. An annual recovery drill that exercises restore permissions once. 3. A certificate or key rotation on a yearly schedule. 4. A seasonal capacity change run twice a year. Revoke on a thirty-day observation and the first three of those vanish, and their absence is discovered at the worst possible moment — during the close, during the drill, at expiry. So the window must be at least as long as the longest legitimate cycle you can name, and where it cannot be, the reviewer must be told that the evidence is weak for that class of permission rather than shown a confident "unused". ## Where the evidence is genuinely weak Three limits should be stated whenever the output is handed to someone who will act on it: | limit | why it matters | |---|---| | operations on data may not be recorded | if only management events are captured, a principal that reads stored contents all day can look idle | | a shared identity collapses attribution | one automation credential used by several teams produces one merged usage set, and none of it maps to a person | | the record shows the operation, not the grant | one action can be authorised by more than one permission, so removing the obvious one may change nothing | The third is subtle and worth stating precisely: the audit record answers *which operation was called and whether it succeeded*. Which permission permitted it, and whether another permission would have permitted it anyway, is a question you answer by reading the access model, not the events. Treating usage data as a map of the permission graph is the error that produces removals with no effect and a false sense of progress. ## Making the removal safe Because the evidence is good but not complete, the removal is staged rather than immediate: 1. **Produce the candidate list** from the window, per principal, with the observed usage attached so a reviewer can see the basis. 2. **Narrow before deleting** where the platform allows it — reduce a broad action to the specific operations observed, or add a condition, rather than removing the grant outright. 3. **Watch the refusals for a full cycle.** Denied operations after a tightening are exactly the feedback the review needs, and they arrive in the same record. This is the step that makes the whole thing safe, because the mistake announces itself as a denial rather than as a silent breakage. 4. **Then delete**, and record the date, so the next review starts from a known baseline instead of re-deriving everything. ## What this is and is not evidence of Used correctly, the record is evidence that a permission has not been exercised in a stated window by a stated identity. That is a strong argument for removing it, and it is not the same claim as "this permission is not needed" — which is a judgment made by a human who knows what the identity is for. Reviews that present the first as if it were the second get their removals reversed after the first outage, and the next review is treated as noise. The credibility of the process is worth more than any individual permission it removes.

  • A principal shows zero recorded activity for the whole window. Is that a safe removal?
    Safer than most, but check two things first. If only management events are captured, an identity whose entire job is reading or writing data will look idle while being fully in use. And confirm the window covers any annual or quarterly cycle the identity exists for. A genuinely silent principal that fails both checks is the strongest candidate on the list.
  • The review removes a permission, and nothing breaks for a month. What does that prove?
    Less than it appears. It proves the permission was not needed in that month, which you already believed from the window. The real test is the first occurrence of whatever cycle the permission served. Until that has passed once, the removal is provisional — which is why the date of removal is worth recording alongside it.
  • Why collect denied operations separately rather than folding them into usage?
    Because they mean the opposite thing. A performed operation is evidence a grant is being used; a denied one is evidence a grant is absent. Merging them would count blocked attempts as justification for keeping permissions the principal never had — and would hide the two findings worth escalating: a job quietly failing, and an identity reaching past its remit.

saying these in an interview costs you the question

  • Reviews usage over a window shorter than the business cycle
  • Treats no recorded activity as proof a permission is unnecessary
  • Assumes the record identifies which grant authorised each call
  • Ignores denied operations as failed noise
  • Attributes a shared automation identity's usage to one person
  • Deletes grants in bulk without watching refusals afterwards