Query Details
id: b2c3d4e5-2001-4b22-9d01-0123456789c1
name: Copilot Studio - Conversation volume by user / session
description: |
Surfaces the busiest Copilot Studio users, sessions and channels over
the lookback window so an analyst can spot scripted abuse, denial-of-
wallet pacing, or a single identity dominating an agent. Lower-volume
context than the flooding analytic rule, for proactive review.
query: |
let lookback = 1d;
AppEvents
| where TimeGenerated > ago(lookback)
| where Name in ("BotMessageReceived", "BotMessageSend")
| extend
ConvId = tostring(Properties["conversationId"]),
ChannelId = tostring(Properties["channelId"]),
DesignMode = tostring(Properties["DesignMode"])
| summarize
InboundTurns = countif(Name == "BotMessageReceived"),
OutboundTurns = countif(Name == "BotMessageSend"),
Conversations = dcount(ConvId),
Channels = make_set(ChannelId, 10),
ClientIPs = make_set(ClientIP, 25),
FirstSeen = min(TimeGenerated),
LastSeen = max(TimeGenerated)
by UserId, SessionId
| extend TurnsPerConversation = round(toreal(InboundTurns) / iff(Conversations == 0, 1, Conversations), 1)
| order by InboundTurns desc
tactics:
- Impact
techniques:
- T1499
tags:
- Sentinel-As-Code
- Custom
- CopilotStudio
- AI
This query is designed to analyze user activity in Copilot Studio over the past day. It focuses on identifying the most active users, sessions, and channels to help analysts detect potential issues such as scripted abuse or a single user dominating interactions. Here's a breakdown of what the query does:
Time Frame: It looks at events from the past day (lookback = 1d).
Event Filtering: It filters for events where a bot message was either received or sent ("BotMessageReceived", "BotMessageSend").
Data Extraction: It extracts relevant properties like conversation ID, channel ID, and design mode from the event properties.
Data Aggregation:
Calculations: It calculates the average number of turns (messages) per conversation.
Sorting: The results are sorted by the number of inbound messages in descending order, highlighting the busiest users or sessions.
The query is tagged with tactics and techniques related to potential impacts and is part of a custom analytic rule set for proactive monitoring in Copilot Studio.

David Alonso
Released: June 8, 2026
Tables
Keywords
Operators