Prove identity impact without using it
Brief
The impact of an exposed account is proven from the outside: what its groups, roles, app grants and mailbox rights would hand an attacker, read by a review identity and counted rather than opened. A What If check shows what Conditional Access would ask of an attacker's machine, and one sign-in from our own test account shows the answer holds.
On this page
- Check first
- Which roles, groups and app grants does the account hold?
- How much mail does the account reach, counted and not opened?
- What would Conditional Access ask of an outside machine?
- Does one test sign-in match the What If result?
- Did we change anything?
- The defender sees
- Done when
- Not covered
- Tools
- Related research
- Reviewed
- Situation
- A finding from an earlier stage that exposes one account, such as a password in a file share or a session the stolen token page showed still worked, and a statement of what the client wants proven. We never sign in as that account or use its token. We read as a review identity with Global Reader,
AuditLog.Read.Alland Exchange View-Only Organization Management, and make one sign-in with a test account the client created and placed in the same Conditional Access groups, in the tenant the scope letter names. - Goal
- An impact statement for one account: its roles, groups and app grants, how many mailboxes and items it reaches, what Conditional Access would ask of an outside sign-in, and the one test sign-in that confirms it, with nothing opened or changed.
- Outputs
- Representative examples on placeholder hosts, trimmed to the lines that matter. Not captured from a public fixture yet.
Check first
- The account, the finding that exposed it, and what the client wants proven: mail, files, admin rights, or all three.
- The review identity's roles are read-only, and the client approved Exchange View-Only Organization Management for the test window.
- A test account made for the engagement, in the same Conditional Access groups as the exposed account but holding none of its roles.
- If the exposure is live, the client resets the account before we start; proving impact does not need it to stay open.
- A client contact to call if anything suggests someone other than us is using the account.
Steps
Which roles, groups and app grants does the account hold?
Connect-MgGraph -Scopes 'Directory.Read.All','AuditLog.Read.All' -NoWelcome
$u = Get-MgUser -UserId 'svc-helpdesk@example.com'
$m = Get-MgUserTransitiveMemberOf -UserId $u.Id -All
$m.Count
$m | Where-Object { $_.AdditionalProperties.'@odata.type' -eq '#microsoft.graph.directoryRole' } | ForEach-Object { $_.AdditionalProperties.displayName }
Get-MgUserOauth2PermissionGrant -UserId $u.Id -All | Select-Object ClientId, Scope
Expected output
41
Helpdesk Administrator # <- can reset passwords for non-admin users
ClientId Scope
-------- -----
3f2a9c71-0b6e-4d58-9a1e-7c4d2e8b5f60 Mail.Read Files.Read.All offline_access
Transitive membership includes nested groups and active directory roles, so one call gives the account's whole standing reach. Each Microsoft 365 group also brings a Teams team and a SharePoint site. Delegated grants are apps the account consented to, and a grant stays in place after a password reset until someone revokes it.
Negative result. No directory role, a group count that matches the job, and no grants beyond the apps the client approved.
Fix. Make the role eligible through PIM rather than standing, remove groups the job does not need, and revoke grants nobody recognises.
How much mail does the account reach, counted and not opened?
Get-EXOMailboxFolderStatistics -Identity svc-helpdesk@example.com | Measure-Object ItemsInFolder -Sum | Select-Object Count, Sum
Get-EXOMailbox -ResultSize Unlimited | Get-EXOMailboxPermission -User svc-helpdesk@example.com | Measure-Object | Select-Object Count
Expected output
Count Sum
----- ---
64 18342
Count
-----
214 # <- full access to 214 other mailboxes; none was opened
Folder statistics give folder and item counts with no subjects or bodies. Mailbox permissions show where the account holds full access to someone else's mailbox, which is common for help desk and service accounts and rarely reviewed. The second line walks every mailbox, so on a large tenant we run it once and keep the result.
Negative result. Its own mailbox only, and full access to shared mailboxes the client lists.
Fix. Remove full access that no current process needs, and grant shared mailbox access through a group with an owner who reviews it.
What would Conditional Access ask of an outside machine?
Entra admin center, Conditional Access, Policies, What If
User: svc-helpdesk Target: Office 365 Exchange Online IP: 203.0.113.50
Device platform: Windows Client app: Browser Sign-in risk: none
Expected output
Policies that will apply: none
Policies that will not apply:
CA001 Require MFA for all users Users and groups (excluded: grp-service-accounts) # <- the account sits in the exclusion group
CA004 Block outside trusted locations Locations (policy is report-only)
What If evaluates the policies for a user and a set of conditions without anyone signing in. We use an address outside the client's named locations, since that is where an attacker would sign in from.
Negative result. A policy that requires phishing-resistant MFA, or blocks the sign-in, applies to the account from outside.
Fix. Take the account out of the exclusion group, or replace the exclusion with a policy that limits it to named locations and compliant devices.
Does one test sign-in match the What If result?
Get-MgAuditLogSignIn -Filter "userPrincipalName eq 'atarus-impact-01@example.com'" -Top 1 |
Select-Object CreatedDateTime, AppDisplayName, IPAddress, ConditionalAccessStatus, AuthenticationRequirement
Expected output
CreatedDateTime : 28/10/2026 14:31:07
AppDisplayName : My Apps
IPAddress : 203.0.113.50
ConditionalAccessStatus : notApplied
AuthenticationRequirement : singleFactorAuthentication # <- a password alone was enough from outside
The test account signs in once to the My Apps portal from our test host and signs out. It holds none of the exposed account's roles, so the sign-in proves the policy gap without reaching anything. The Conditional Access review covers the gap across the tenant.
Negative result. failure or multiFactorAuthentication, matching a What If that said a policy applies.
Fix. Close the exclusion, then repeat the test sign-in as the retest.
Did we change anything?
Get-MgAuditLogDirectoryAudit -All -Filter "activityDateTime ge 2026-10-28T13:00:00Z and initiatedBy/user/userPrincipalName eq 'atarus-review@example.com'" | Measure-Object | Select-Object Count
Expected output
Count
-----
0 # <- reads only; the review identity wrote nothing
The directory audit log records changes, not reads, so a zero is the evidence that the review changed nothing. The count and the test sign-in go in the report appendix, beside the impact paragraph.
Negative result. Any entry needs an explanation before the report is written.
Fix. For the client: keep sign-in and audit logs in a workspace for a year, so this check works for any account, including an attacker's.
The defender sees
Graph PowerShell and Exchange Online PowerShell sign-ins by the review identity (Get cmdlets are not written to the admin audit log), and one sign-in by the test account from an address outside the named locations with no MFA. That last one is what a real attacker's first sign-in would look like, so if no alert or risk detection fired on it, the missing detection belongs in the report beside the impact.
Done when
The account's roles, group count and delegated grants are listed, mailbox reach is counted without opening anything, the What If result is recorded, one test sign-in matches it in the sign-in log, and the directory audit log shows no change by us.
Not covered
How the account was exposed, opening mail or files, which this page rules out, and on-premises Active Directory reach (see network impact without damage); the outputs shown are representative examples on a placeholder tenant, not captured runs.