Before you run
Data & scope
- Required tables
- Time window
- 7 days
- Azure Activity Administrative events exported for the subscriptions hosting the relevant Microsoft.CognitiveServices resources.
- Query access to AzureActivity; retain an asset inventory to distinguish AI accounts and environments.
Documentation review by Codex (AI). No live-tenant execution or detection-performance claim. Validate schema, data coverage and expected results in your workspace.
// Hunting starter. Documentation checked 2026-11-13; not tenant-tested.
let lookback = 7d;
AzureActivity
| where TimeGenerated >= ago(lookback) and TimeGenerated <= now()
| where CategoryValue =~ "Administrative"
| where OperationNameValue startswith "Microsoft.CognitiveServices/"
| where OperationNameValue endswith "/write"
| extend AffectedResource = coalesce(ResourceId, _ResourceId)
| project TimeGenerated, SubscriptionId, ResourceGroup,
AffectedResource, OperationNameValue, ActivityStatusValue,
ActivitySubstatusValue, Caller, CallerIpAddress, CorrelationId,
OperationId, EventDataId, Properties_d
| order by TimeGenerated desc
| take 200
Read-only query. Run in your own authorized workspace after checking prerequisites.
Use this hunt to locate recorded configuration writes for the Microsoft.CognitiveServices resource provider. The provider includes Azure AI accounts and child resources such as deployments, projects and networking-related configuration. This is a control-plane review: it does not search prompts or count model inference. Provider operation reference.
Read the result
The operation prefix and /write suffix deliberately avoid a brittle list of individual account or deployment operations. Only Administrative events are considered. All reported statuses remain visible so failed or incomplete changes can be investigated as well as completed ones. A returned event establishes that an operation was logged, not that a particular security property changed or that the final state became unsafe.
AffectedResource, caller and correlation identifiers support a move from the event to the actual asset and change process. Properties_d is left as a dynamic property bag because different provider operations expose different details. The query does not invent fields for previous network settings, disabled authentication, model versions or a before/after diff. AzureActivity schema.
Triage and tune
First match the resource to its owner, environment and expected deployment pipeline. Confirm the final operation outcome, then compare the current configuration with the deployment’s desired state and any available change history. For unexpected account writes, review network access, local-key authentication, identity and encryption settings as separate checks; the generic write event alone does not tell you which of these changed.
Model deployment updates and routine configuration reconciliation can be legitimate. Investigate an unfamiliar caller, unexpected scope or change outside the normal release window. Prefer an explicit environment or subscription filter over suppressing an entire automation identity whose permissions might span many resources.
Limits and validation
The result shows the latest 200 records in seven days and can contain multiple lifecycle events for one operation. It excludes deletes, action operations such as key regeneration, providers such as Microsoft.MachineLearningServices, and data-plane activity. Expand those areas with separately scoped hunts rather than treating this as complete Azure AI coverage. This read-only recipe was checked against documentation, not executed in a tenant or validated as a detection. Compare a planned test configuration write with the ingested event before relying on its coverage.
Verify the source
Microsoft references
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 →