Problem
Who has access to what?
Also asked as: who can access this system, an access audit trail, an entitlement report, or "who could have done this?"
It sounds like one question. It is two, and the one that matters during an incident is the one most teams cannot answer.
"Who has access to what" asks who holds access now, and who held it at a given time. The first is a listing of group members in each system. The second is a history, and it exists only if every grant was recorded with who asked, who approved, and when it began and ended.
Two questions, two different answers
| Now | Then | |
|---|---|---|
| Who asks it | Access reviews, auditors, a new security lead | Incident response: "who could reach the database on the night of the 14th?" |
| Where the answer lives | Each system's current group memberships | Each system's audit log, if it kept that far back, or a record of grants |
| How hard it is | Tedious, but always answerable | Often unanswerable with standing access, because nothing changed to log |
That last cell is the trap. A permanent group membership added two years ago leaves one log line two years ago, probably past retention, and nothing since. Asked who could reach a system last Tuesday, the honest answer is "everyone in the group now, plus anyone removed since, minus anyone added since", worked out by hand from logs that may not go back that far.
Why it is hard to answer
- Access is spread across systems. One engineer's real access is an Entra group, a GitHub team, an AWS IAM group and a Google group. No one console shows all four.
- Groups nest. Membership of a group inside a group counts, and the direct member list leaves it out.
- Standing membership has no reason attached. The group says who, not why or until when, so a reviewer cannot tell a mistake from a decision.
- History is per system. Every platform keeps its own audit log, in its own format, for its own retention period.
Answering "now", platform by platform
Start with the groups that carry the most power: production, admin roles, customer data. Then list their members, including nested ones, with each platform's own call:
| Platform | Members of a group | Note |
|---|---|---|
| Entra ID | GET /v1.0/groups/{id}/transitiveMembers (Microsoft Graph) |
transitiveMembers includes nested groups. members does
not. |
| Okta | GET /api/v1/groups/{groupId}/users |
Paginated by cursor. Follow every page, or the list quietly stops. |
| Google Workspace | GET /admin/directory/v1/groups/{groupKey}/members |
Add includeDerivedMembership=true for members of nested groups. |
| GitHub | gh api --paginate orgs/{org}/teams/{team_slug}/members |
Organization owners can reach everything regardless of team. List them too. |
| AWS IAM | aws iam get-group --group-name {name} |
Covers IAM groups only. Who can assume a role is in the role's trust policy. |
| Active Directory | Get-ADGroupMember -Identity {name} -Recursive |
-Recursive flattens nested groups. |
Put the results in one sheet: person, system, group, and a column for "why". The column you cannot fill is the finding. We set out the full review process, with a template, in how to run a user access review with a small team.
Answering "then": keep a record of grants, not memberships
The history question has one good answer, and it has to be in place before the incident: make access something that is granted, with a record per grant, rather than something that is held. Each grant is a row:
| Who | What | Why | Approved by | From | Until | Removed |
|---|---|---|---|---|---|---|
| A. Engineer | Production database, write | Migrating the orders table | B. Lead | Tue 14:02 | Tue 18:02 | Tue 18:02, confirmed |
With access granted that way, "who could reach production last Tuesday at 3 a.m.?" is a filter on that table, and the answer is usually nobody. The record is not a log you mine afterwards. It is the access.
How TemprBac answers both
TemprBac grants group membership in Entra ID, Okta, Google Workspace, GitHub, AWS IAM and Active Directory for a window of one to eight hours, and every grant is the row above. Its reports are built on those rows:
- Access grants: who holds what, granted when, expiring when. That is the "now" answer.
- Request pipeline and approval decisions: every request, where it stalled, and who approved or denied it.
- Delivery operations: whether each grant and each removal actually reached the system, not just whether it was asked for.
- Break-glass usage, sign-in activity and administrative changes: the exceptions, and the changes to the rules themselves.
Each one filters, and exports as CSV for whoever asked.
What it does not see
TemprBac's record covers the access it granted. If someone adds a member to a managed group by hand, directly in the directory, TemprBac does not see it. It does not yet read groups back to find strays. Access that never goes through a group, such as an app assigned directly to a person or a policy attached to one IAM user, is outside it too. So keep running the "now" calls above against the groups TemprBac manages, and remove anyone who is not there through a grant. An empty group plus a record of grants is the state that makes both questions easy.