audit_log_search_result
Check status and retrieve summarized records from an Entra audit log search started by audit_log_search_start; poll until done, then page results.
Instructions
Status and, once finished, the summarised records of an audit search started by audit_log_search_start.
Reads Graph GET /security/auditLog/queries/{id}. While status is
notStarted or running the answer is the status only (done: false); call again in a minute or two. failed, cancelled and any
status this server does not know are done: true with an error. Once succeeded, the records are paged
(/records) and come back as:
summary:total_records,first_seen/last_seen, counts by operation, service, record type and user, and per client IP the count with first/last seen (top 25 of each list;distincthas the full counts);records: the newesttoprecords, each with time, operation, service, record type, user, client IP, object id and a fewdetailsfromauditData(client IP, user agent, result status, site URL, file name, the names of cmdlet parameters -- never their values), every string cut to 200 characters. The fullauditDatais not returned.
capped=true means the counts are lower bounds: either the page budget or
the deadline ran out before every record was read (call again with a larger
max_pages), or query.record_count_limit_exceeded is true -- Graph
itself stopped collecting at its per-search record limit
(query.record_count_limit), so the search holds only part of the
matching records whatever max_pages is; narrow the window or the
filters and start a new search. records_truncated means more records were read than
top returns (the summary counts them all). An unknown id is found: false: a search exists only in the tenant that created it, so pass the
tenant its start call used. Permissions as audit_log_search_start; a
403 returns missing_permission.
Args:
query_id: The query_id returned by audit_log_search_start (a GUID).
top: Maximum records to return, clamped to [1, 500].
max_pages: Page budget for the records (default: ENTRAADM_MAX_PAGES_DEFAULT).
tenant: Tenant the search was started in: a [tenant.] section name, one of its domains or its
tenant id (default: the default tenant).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | ||
| tenant | No | ||
| query_id | Yes | ||
| max_pages | No |