How to write up an identity finding
Brief
An identity team fixes a finding fastest when it can open the exact policy, see the setting at fault as the directory returns it, find the sign-in that proves the gap and apply the change in the portal or in code. That means tenant and object ids, the policy quoted with its state, a pointer to the log event, an honest coverage statement, the fix both ways, and a retest that reads one log line.
On this page
- Check first
- Which identifiers does an identity finding need?
- How do I quote the policy or setting at fault, with its state?
- How do I point at the sign-in and audit events?
- How do I write the coverage statement?
- How do I give the fix as a portal path and as code?
- How do I write the retest?
- The defender sees
- Done when
- Not covered
- Tools
- Related research
- Reviewed
- Situation
- A confirmed identity finding, here a Conditional Access exclusion that let a client-made test account sign in with a password alone, with the read-only review account that showed it still available. Everything here concerns the tenant the scope letter names, every command is a read made to fill in the write up, and the fix commands are run by the client's identity team, not by us.
- Goal
- One identity finding an identity engineer can locate, understand, fix in the portal or in code and verify from the ticket alone.
- Outputs
- Representative examples on placeholder hosts, trimmed to the lines that matter. Not captured from a public fixture yet.
Check first
- The finding is confirmed with a client-made test account, never a real user's sign-in.
- The review account still has read access to policies, groups and logs, so every quote is read fresh on the day of writing.
- Whether the client manages Conditional Access in code, so the fix goes where they change it.
- The sign-in log retention for the tenant's licence: 30 days with Entra ID P1 or P2, so the event pointer is captured before it ages out.
- The general structure every finding follows, from writing a finding. This page adds what is different for identity.
Steps
Which identifiers does an identity finding need?
Get-MgOrganization | Select-Object Id, DisplayName
Get-MgIdentityConditionalAccessPolicy -All | Where-Object DisplayName -eq 'CA01 Require MFA all users' | Select-Object Id, DisplayName
Expected output
Id DisplayName
-- -----------
11111111-2222-3333-4444-555555555555 Contoso Test
Id DisplayName
-- -----------
6f1c2a7e-0b3d-4e9a-8c21-5d7f0e4b9a13 CA01 Require MFA all users # <- the id survives a rename; the name does not
The tenant id, then the object id of every policy, group and account the finding names. Display names change and repeat; ids do not. Accounts are given by object id and type ("a client-made test account", "a member account"), never by a person's name. In Okta the equivalent is the org URL and the policy and rule ids.
Negative result. The object is gone by the time we write; the finding says so, with the ids from the evidence and when it was last seen.
Fix. Name policies with a stable prefix and record each policy id in the client's own register.
How do I quote the policy or setting at fault, with its state?
$p = Get-MgIdentityConditionalAccessPolicy -ConditionalAccessPolicyId 6f1c2a7e-0b3d-4e9a-8c21-5d7f0e4b9a13
$p | Select-Object State, ModifiedDateTime
$p.Conditions.Users.ExcludeGroups | ForEach-Object { "$_ members: $(Get-MgGroupMemberCount -GroupId $_ -ConsistencyLevel eventual)" }
Expected output
State ModifiedDateTime
----- ----------------
enabled 2026-09-30 08:14:02
3c9b2f10-7a44-4d0e-9e61-2b8a5c1d7f20 members: 2
a8e1d4c7-55b2-4f39-b0a6-91c3e7d2f4b8 members: 14 # <- an exclusion group of fourteen, where the break-glass group has two
Quote the state (enabled, disabled or enabledForReportingButNotEnforced) and the modified time beside the setting at fault. The exclusion group is given by id and member count; the members are listed by account type in an appendix, never by name.
Negative result. No single setting is at fault, only two policies that leave a gap between them; then quote both and say which pair creates it.
Fix. Keep exclusions to the break-glass accounts only, and give every other exception its own policy with its own conditions.
How do I point at the sign-in and audit events?
Get-MgAuditLogSignIn -Filter "userId eq '0d4e2b19-6c8a-4f7e-a3b5-9e1c7d2a6f04' and createdDateTime ge 2026-10-28T13:00:00Z" -Top 1 |
Select-Object Id, CorrelationId, CreatedDateTime, ConditionalAccessStatus, AuthenticationRequirement
Get-MgAuditLogDirectoryAudit -Filter "activityDisplayName eq 'Add member to group' and targetResources/any(t:t/id eq '0d4e2b19-6c8a-4f7e-a3b5-9e1c7d2a6f04')" -Top 1 |
Select-Object Id, ActivityDateTime
Expected output
Id : 7a2e91c4-3b6d-4f80-a1e5-c9d4b2f07e63
CorrelationId : 5b8f0d2a-1e47-4c93-b6a8-e2d7c4f19a05
CreatedDateTime : 2026-10-28 13:41:22
ConditionalAccessStatus : notApplied
AuthenticationRequirement: singleFactorAuthentication # <- the test account signed in with a password alone
Id ActivityDateTime
-- ----------------
Directory_0f3a8c2e9b14_7KQ2M_41205838 2026-10-27 16:05:10
The first object id is the client-made test account. The sign-in id and correlation id let the team open the same event in the portal; the audit event shows when the test account was added to the exclusion group, which the client did for the test. In Okta the pointer is the System Log event's uuid.
Negative result. No sign-in event for the claim, usually because it aged out; the finding then says so, and the retention gap is a second finding.
Fix. Send sign-in and audit logs to a workspace with retention longer than the tenant default.
How do I write the coverage statement?
(Get-MgIdentityConditionalAccessPolicy -All).Count
Expected output
23 # <- twenty-three policies; the review read all of them
Coverage: tenant 11111111-2222-3333-4444-555555555555, all 23 Conditional Access policies,
authentication methods policy, sign-in logs 21 to 28 Oct 2026, read-only review account.
Not reviewed: Azure resource roles, on-premises Active Directory, B2B guest tenants.
The statement stops a clean result from reading as "nothing wrong in identity".
Negative result. Everything in scope was reviewed; say that, with the date.
Fix. Keep a list of identity systems the client runs, so coverage is measured against it.
How do I give the fix as a portal path and as code?
$body = @{ conditions = @{ users = @{ excludeGroups = @('3c9b2f10-7a44-4d0e-9e61-2b8a5c1d7f20') } } }
Update-MgIdentityConditionalAccessPolicy -ConditionalAccessPolicyId 6f1c2a7e-0b3d-4e9a-8c21-5d7f0e4b9a13 -BodyParameter $body
(Get-MgIdentityConditionalAccessPolicy -ConditionalAccessPolicyId 6f1c2a7e-0b3d-4e9a-8c21-5d7f0e4b9a13).Conditions.Users.ExcludeGroups
Expected output
3c9b2f10-7a44-4d0e-9e61-2b8a5c1d7f20 # <- only the break-glass group remains excluded
The portal path goes first: Entra admin center, Protection, Conditional Access, Policies, CA01, Users, Exclude. The Graph call is PATCH /identity/conditionalAccess/policies/{id}; the array replaces the old one, so it lists every group that should stay. The client's identity team runs it; we read the result they share.
Negative result. The policy is managed in code; the fix is then a change to that file, and a portal change would be undone on the next deploy.
Fix. Manage Conditional Access in code with review, and alert on policy changes made outside it.
How do I write the retest?
Get-MgAuditLogSignIn -Filter "userId eq '0d4e2b19-6c8a-4f7e-a3b5-9e1c7d2a6f04' and createdDateTime ge 2026-11-04T09:00:00Z" -Top 1 |
Select-Object CreatedDateTime, ConditionalAccessStatus, AuthenticationRequirement
Expected output
CreatedDateTime : 2026-11-04 09:12:40
ConditionalAccessStatus : success
AuthenticationRequirement: multiFactorAuthentication # <- before the fix this read singleFactorAuthentication
The client signs the test account in once after the change and we read the event.
Negative result. Still singleFactorAuthentication: the finding stays open with the retest date.
Fix. Keep the test account and a scheduled sign-in check, so the gap is noticed if it returns.
The defender sees
The write up is reads under the review account, which appear as sign-ins by that account and, for Graph calls, in the Graph activity log where it is enabled. The pointers let the identity team search for the same pattern from any other account, which is the question an identity finding should always leave them asking.
Done when
The finding names the tenant id and every object id, quotes the policy or setting with its state and modified time, points to the sign-in and audit events by id, states coverage, gives the fix as a portal path and as Graph or PowerShell, and ends with a retest and its expected result.
Not covered
Severity scoring in general (see writing a finding), proving reach (see identity impact without damage), and Okta or Google Workspace detail beyond the equivalents named; the outputs shown are representative examples on a placeholder tenant, not captured runs.