← Back to SOC feed Coverage →

Copilot Studio AI Agents - Published Agents with Author Authentication

kql MEDIUM Azure-Sentinel
backdoorcredential-thefthuntingmicrosoftofficial
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at Azure-Sentinel →
Retrieved: 2026-04-21T09:00:00Z · Confidence: medium

Hunt Hypothesis

Published Copilot Studio AI agents using an author’s personal credentials for authentication pose a security risk by potentially exposing sensitive credentials and enabling unauthorized access. SOC teams should proactively hunt for this behavior to identify and mitigate potential credential misuse and unauthorized agent activity in their Azure Sentinel environment.

KQL Query

let base = AIAgentsInfo
| where RegistrySource != "A365"
| summarize arg_max(Timestamp, *) by AIAgentId
| where AgentStatus == "Published";
let directActions = base
| mv-expand detail = AgentToolsDetails
| where detail.action.connectionProperties.mode == "Maker"
| extend ActionType = "FromTools", Action = detail.action
| project-reorder AgentCreationTime, AIAgentId, AIAgentName, AgentStatus, CreatorAccountUpn, OwnerAccountUpns;
let topicActions = base
| mv-expand topic = AgentTopicsDetails
| extend topicActionsArray = topic.beginDialog.actions
| mv-expand Action = topicActionsArray
| where Action.connectionProperties.mode == "Maker"
| extend ActionType = "FromTopic"
| project-reorder AgentCreationTime, AIAgentId, AIAgentName, AgentStatus, CreatorAccountUpn, OwnerAccountUpns, Action;
directActions
| union topicActions
| sort by AIAgentId, Timestamp desc

Analytic Rule Definition

id: 1f6a9b2c-3d4e-5f6a-7b8c-9d0e1f2a3b4c
name: Copilot Studio AI Agents - Published Agents with Author Authentication
description: |
  This query identifies Copilot Studio AI agents that are published and use the maker`s personal credentials in their authentication or integration flows. 
  This configuration introduces security risks because any interaction with the agent could leverage the maker`s privileges, potentially granting access to sensitive resources. 
  If the agent is compromised, attackers could perform actions with the maker`s permissions, leading to privilege escalation or data exposure.
  Recommended Action: Replace maker credentials with secure alternatives such as managed identities or service principals. 
  Ensure published agents follow least-privilege principles and avoid personal credential usage in production environments.
requiredDataConnectors: []
tactics: []
relevantTechniques: []
query: |
  let base = AIAgentsInfo
  | where RegistrySource != "A365"
  | summarize arg_max(Timestamp, *) by AIAgentId
  | where AgentStatus == "Published";
  let directActions = base
  | mv-expand detail = AgentToolsDetails
  | where detail.action.connectionProperties.mode == "Maker"
  | extend ActionType = "FromTools", Action = detail.action
  | project-reorder AgentCreationTime, AIAgentId, AIAgentName, AgentStatus, CreatorAccountUpn, OwnerAccountUpns;
  let topicActions = base
  | mv-expand topic = AgentTopicsDetails
  | extend topicActionsArray = topic.beginDialog.actions
  | mv-expand Action = topicActionsArray
  | where Action.connectionProperties.mode == "Maker"
  | extend ActionType = "FromTopic"
  | project-reorder AgentCreationTime, AIAgentId, AIAgentName, AgentStatus, CreatorAccountUpn, OwnerAccountUpns, Action;
  directActions
  | union topicActions
  | sort by AIAgentId, Timestamp desc
entityMappings:
  - entityType: Account
    fieldMappings:
      - identifier: FullName
        columnName: CreatorAccountUpn
  - entityType: Host
    fieldMappings:
      - identifier: HostName
        columnName: AIAgentName
version: 1.0.0

References

False Positive Guidance

Original source: https://github.com/Azure/Azure-Sentinel/blob/main/Hunting Queries/AI Agents/Copilot Studio Connector/PublishedAIAgentsAuthorAuthentication.yaml