Microsoft Foundry High Request and Token Volume

Last updated a day ago on 2026-10-05
Created 5 days ago on 2026-10-01

About

Detects one caller IP sending a high number of requests and consuming a high number of tokens against the same Foundry deployment and operation during the rule lookback. That rate fits a script or a stolen key burning quota. The rule uses RequestResponse logs and does not need the prompt text. Tune the request count and token sum in the query.
Tags
Data Source: Microsoft FoundryUse Case: Threat DetectionMitre Atlas: AML.T0029Tactic: ImpactRule Type: ES|QLPlatform: AzureDomain: CloudDomain: GenAIService: Azure AI FoundryLanguage: esql
Severity
medium
Risk Score
47
MITRE ATT&CK™

Impact (TA0040)(external, opens in a new tab or window)

False Positive Examples
Approved batch jobs, evaluation harnesses, and user-facing apps that fan out from one NAT. Exclude that caller IP prefix and deployment, or raise the thresholds to sit above the normal 9-minute peak. Foundry masks the last octet of caller_ip_address, so unrelated users behind the same network prefix are counted together.
License
Elastic License v2(external, opens in a new tab or window)

Definition

Integration Pack
Prebuilt Security Detection Rules
Related Integrations

azure_ai_foundry(external, opens in a new tab or window)

Query
text code block:
from logs-azure_ai_foundry.logs-* | where data_stream.dataset == "azure_ai_foundry.logs" and azure.ai_foundry.category == "RequestResponse" and azure.ai_foundry.caller_ip_address is not null and azure.ai_foundry.properties.prompt_tokens > 0 | stats Esql.event_count = count(*), Esql.azure_ai_foundry_properties_prompt_tokens_sum = sum(azure.ai_foundry.properties.prompt_tokens), Esql.azure_ai_foundry_properties_completion_tokens_sum = sum(azure.ai_foundry.properties.completion_tokens), Esql.azure_ai_foundry_result_signature_failed_count = count(*) where azure.ai_foundry.result_signature != "200", Esql.timestamp_first_seen = min(@timestamp), Esql.timestamp_last_seen = max(@timestamp) by azure.ai_foundry.caller_ip_address, azure.ai_foundry.properties.model_deployment_name, azure.ai_foundry.operation_name, azure.resource.name, azure.resource.group | eval Esql.total_tokens_sum = Esql.azure_ai_foundry_properties_prompt_tokens_sum + Esql.azure_ai_foundry_properties_completion_tokens_sum | where Esql.event_count >= 100 and Esql.total_tokens_sum >= 10000 | keep azure.ai_foundry.caller_ip_address, azure.ai_foundry.properties.model_deployment_name, azure.ai_foundry.operation_name, azure.resource.name, azure.resource.group, Esql.*

Install detection rules in Elastic Security

Detect Microsoft Foundry High Request and Token Volume in the Elastic Security detection engine by installing this rule into your Elastic Stack.

To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).