Suspicious Assistive Agent Behavior Detected Through Microsoft Entra Agent ID Logs

As organizations rapidly adopt AI-driven workflows like Microsoft Copilot, security teams face a new challenge: tracking the actions of autonomous and assistive agents.

In Microsoft Entra ID, assistive agents use the On-Behalf-Of (OBO) flow to perform tasks for signed-in users, such as analyzing data or generating emails.

While these agents operate with delegated permissions to minimize potential damage, they are not immune to manipulation.

If an attacker compromises an agent, it can execute malicious actions that blend seamlessly with legitimate user activity.

Understanding how to hunt for these behaviors in Entra ID logs is critical for modern threat detection, especially as adversaries increasingly target OAuth flows and agent permissions.

Entra Logs Flag Agents

To grant an assistive agent permission to act on their behalf, a user must consent to the access_agent scope of the agent’s underlying blueprint principal.

Attackers often target this phase, sometimes using techniques such as ConsentFix to hijack authorization codes via localhost redirects.

Once consent is granted, the agent’s authorization becomes the intersection of its own permissions and the user’s assigned roles.

Consider a realistic threat scenario: an assistive agent sends a suspicious email with the subject line “Here is your invoice” to an external address on behalf of a human employee.

A preliminary look at Microsoft Purview Exchange logs reveals the basics. The logs confirm the agent identity, the human user it impersonated, the operation type, and the recipient.

Entra Logs Flag Agents (Source: redcanary)
Entra Logs Flag Agents (Source: redcanary)

According to Redcanary research, the key to unmasking the true origin of the malicious activity lies in careful event correlation.

By extracting the UniqueTokenId and ClientRequestId from the initial Purview log, security analysts can cross-reference the Microsoft Graph Activity Logs.

This crucial step bypasses the Microsoft proxy IP, revealing the actual attacker IP address used to initiate the POST request, along with the specific user-agent string and the Graph API endpoint (microsoft.graph.sendMail) used to dispatch the phishing email.

With the true network indicators identified, analysts must then verify the exact agent identity. By matching the token ID with Entra ID’s Non-Interactive User Sign-in Logs, defenders can confirm the precise nature of the authentication.

Because Microsoft does not provide a single, explicit field labeling the authentication flow, analysts must infer it from specific log attributes.

This specific attribute combination proves that the agent identity received a token to act on behalf of the human user, using the granted OAuth scopes, such as Mail. Send and Mail.ReadWrite.

Field descriptionField name
Agent Identity NameServicePrincipalName
Agent Identity Object IDServicePrincipalId
Agent Identity Parent Blueprint IDAgent.parentAppId

As AI agents become deeply integrated into corporate infrastructure, defenders must adapt their threat-hunting strategies to track these new identity types.

Whether investigating autonomous agents, an agent’s dedicated user account, or assistive OBO flows, security teams cannot rely on a single data point.

Successfully detecting suspicious assistive agent behavior requires correlating Exchange data, Graph API activity, and non-interactive sign-ins to tell the full story of an AI-driven attack.

Follow us on Google News , LinkedIn and X to Get More Instant Updates. Set Cyberpress as a Preferred Source in Google.

Varshini
Varshini
Varshini is a Cyber Security expert in Threat Analysis, Vulnerability Assessment, and Research. Passionate about staying ahead of emerging Threats and Technologies..

Trending News

Related Stories