← Sentinel query library

Data access · Microsoft Sentinel

Triage concentrated successful secret retrieval

Rank successful SecretGet bursts by request count and approximate object diversity, with caller evidence and explicit limits on what volume can prove.

Before you run

Data & scope

Required tables
AZKVAuditLogs
Time window
24 hours; 15-minute groups with at least 100 successful SecretGet requests
  • Key Vault AuditEvent diagnostic logs routed in resource-specific mode to AZKVAuditLogs in this workspace.
  • Query access and 24 hours of retained vault telemetry; AzureDiagnostics alone does not populate this table.

Documentation review by Codex (AI). No live-tenant execution or detection-performance claim. Validate schema, data coverage and expected results in your workspace.

Kusto Query Language
Download .kql
// Hunting starter. Documentation checked 2026-11-13; not tenant-tested.
AZKVAuditLogs
| where TimeGenerated >= ago(1d) and TimeGenerated <= now()
| where OperationName =~ "SecretGet"
| where HttpStatusCode between (200 .. 299)
| extend CallerObjectId = coalesce(tostring(Identity.claim.oid),
        tostring(Identity.claim["http://schemas.microsoft.com/identity/claims/objectidentifier"])),
    ClientAppId = tostring(Identity.claim.appid)
| summarize SuccessfulRequests = count(),
    ObjectEstimate = dcount(iff(isnotempty(Id), pack_array(Id), dynamic(null))),
    MissingObjectIds = countif(isempty(Id)),
    ObjectSamples = make_set(Id, 5),
    CorrelationSamples = make_set(CorrelationId, 5),
    FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated)
    by WindowStart = bin(TimeGenerated, 15m), VaultResource = _ResourceId,
        CallerObjectId, ClientAppId, CallerIpAddress
| where SuccessfulRequests >= 100
| extend RequestsPerMinute = round(toreal(SuccessfulRequests) / 15.0, 2)
| order by ObjectEstimate desc, SuccessfulRequests desc, LastSeen desc
| take 200

Read-only query. Run in your own authorized workspace after checking prerequisites.

Use this recipe to identify concentrated successful secret retrieval that deserves operational or security review. It selects SecretGet requests with HTTP 2xx outcomes, groups them into 15-minute windows and returns groups containing at least 100 requests. The threshold is a starting hypothesis for your environment, not a universal measure of abuse.

Interpret volume and breadth separately

A burst may repeatedly retrieve one secret because a client lost its cache, or it may touch many objects. The query reports both request count and an approximate distinct-object estimate. Object identifiers can include versions, so the estimate is not necessarily a count of logical secret names. Missing IDs are reported separately.

Successful SecretGet is meaningful access evidence, but volume alone does not show where the result went afterward. This query neither captures secret values nor proves exfiltration. It also does not represent every sensitive vault operation: key decryption, unwrapping and backup have different operation names and require their own review. Key Vault operation reference.

The average RequestsPerMinute divides a full bin’s count by fifteen. It is not an instantaneous rate, and a partially observed edge bin can understate the active rate. Bursts split across two bins may fail the threshold even when a rolling interval would exceed it.

Investigate the workload

Resolve the caller and application, identify the vault’s owner and compare the timing with deployments, restarts, autoscaling and secret rotation. A fleet-wide cache expiry can produce a sharp benign spike. A new code path that fetches a secret on every request can create the same shape while indicating an availability or cost problem.

Examine the sampled object identifiers in a restricted investigation context; names can reveal sensitive business structure even without secret values. Compare accessed objects with the workload’s expected dependency inventory and effective permissions. The small sample is only a pivot into complete records. Audit field definitions.

Tune and validate

Set thresholds separately for high-throughput services, batch jobs and interactive tooling. Prefer identity/vault-specific expectations with review dates to blanket exclusions of all managed workloads. Keep a route for unusual low-volume access, which this volume hunt will miss.

Validate a known application restart and a normal steady-state interval. Confirm object-ID interpretation and compare the approximate diversity with a scoped raw-event review. Do not create unnecessary production secret reads merely to reach the threshold. This documentation-checked, read-only query has not run in a tenant; it scans 24 hours and returns up to 200 groups without assigning incident severity.

Verify the source

Microsoft references

  1. Microsoft Learn — AZKVAuditLogs table ↗
  2. Microsoft Learn — Key Vault logging ↗
Before turning a hunt into an alert

Measure normal activity, validate known test cases, account for ingestion delays, choose a threshold and entity mapping, and assign an owner. Results require investigation.

Follow the detection learning path →