Microsoft Entra Agent ID logs can expose suspicious assistive agent activity


Microsoft Entra Agent ID logs can help security teams detect when an assistive AI agent acts on behalf of a real user and performs suspicious activity, including sending email through Microsoft Graph. A new Red Canary investigation shows how defenders can trace this activity by correlating Entra sign-in logs, Microsoft Graph activity, and Microsoft Purview Exchange logs.

The scenario focuses on assistive agents, also called interactive agents. These agents work through delegated access, which means they use a signed-in user’s context rather than operating only as a standalone service identity.

That design creates a useful productivity model, but it also creates a monitoring challenge. If an agent receives delegated permissions and then gets manipulated, compromised, or misused, its actions may look like normal user activity unless defenders know which log fields to inspect.

How assistive agents can act on behalf of users

Assistive agents perform tasks for a user, often through a chat or workflow interface. Microsoft says Microsoft Entra Agent ID APIs help organizations create, secure, and manage agent identities that operate inside a tenant.

In an on-behalf-of flow, the user first grants access to an agent blueprint through the access_agent scope. After that consent, the agent can request tokens that reflect the overlap between what the agent can do and what the user is allowed to do.

This matters because permissions such as Mail.Send or Mail.ReadWrite can create real business risk. Even if the user has not manually sent a message, an authorized agent can use Microsoft Graph to perform the action in the user’s context.

TermMeaning
Assistive agentAn agent that performs tasks on demand for a signed-in user
On-behalf-of flowA delegated access flow where the agent acts in the user’s context
access_agent scopeThe scope a user grants so an agent can act on the user’s behalf
Agent blueprintThe parent definition from which agent identities are created
Microsoft GraphThe API layer used to access Microsoft 365 services such as mail, users, groups, and settings

Red Canary traces a suspicious email sent by an agent

The Red Canary scenario begins with a suspicious email sent to an external recipient with the subject line “Here is your invoice.” At first glance, the message appears to come from a normal user account.

A deeper review shows that an agent identity named Agent001 sent the email through the Microsoft Graph beta API on behalf of the user. The event involved the Mail.Send scope, along with other Graph scopes such as Mail.ReadWrite, Group.Read.All, MailboxSettings.ReadWrite, User.Read, openid, profile, and email.

The investigation shows why one log source is not enough. The Purview Exchange log showed a Microsoft infrastructure IP address, while the correlated Graph activity log revealed the originating IP address used for the API call.

  • The Purview Exchange log showed the email send event.
  • The Microsoft Graph Activity Log showed the API call and the real source IP.
  • The non-interactive user sign-in log showed the agent identity and delegated flow pattern.
  • The AuditLogs table showed when the access_agent consent was granted.

The key logs defenders need to correlate

Microsoft documents how Microsoft Entra Agent ID logs capture audit and sign-in activity related to agent identities. The same guidance says agent activity appears under the base identity type from which the activity originates, so analysts must check agent-related fields instead of relying only on the event category.

For this kind of investigation, the AppAccessContext.UniqueTokenId field can help connect Purview Exchange events to Microsoft Graph activity and sign-in data. Without that correlation, analysts may mistake Microsoft infrastructure shown in one log for the true source of the request.

Consent dialog (Source – Red Canary)

The agentSignIn resource type defines fields such as agentType, agentSubjectType, parentAppId, and agentSubjectParentId. Those fields help explain whether the activity came from an agent identity, an agent user, a blueprint principal, or a non-agentic user context.

Log sourceWhat it helps reveal
Microsoft Purview Exchange logShows the email operation, recipient, subject, and related Exchange activity
Microsoft Graph Activity LogShows the Graph API endpoint, source IP, scopes, app ID, and request details
Non-interactive user sign-in logShows token issuance and agent fields for delegated activity
AuditLogs tableShows the Add delegated permission grant event tied to access_agent consent

The log fields that reveal the on-behalf-of flow

In Red Canary’s investigation, the key pattern was Agent.agentType set to agenticAppInstance and Agent.agentSubjectType set to notAgentic in AADNonInteractiveUserSignInLogs. This combination indicated an assistive agent acting on behalf of a human user.

Microsoft’s agentSignIn fields also include parentAppId, which can connect the agent instance back to its parent agent blueprint. That relationship becomes important when responders need to determine where the agent came from and whether the blueprint itself needs review.

The audit trail starts even earlier. Red Canary recommends hunting for the Add delegated permission grant operation in the AuditLogs table to identify when users consent to access_agent. That can give defenders a chance to review newly granted agent access before suspicious activity appears in mail or Graph logs.

  • Search for Add delegated permission grant events tied to access_agent.
  • Track Agent.parentAppId to connect an agent instance to its blueprint.
  • Watch for Microsoft Graph sendMail activity from agent identities.
  • Compare Purview Exchange logs with Graph Activity Logs before trusting the ClientIP field alone.
  • Review non-interactive sign-ins where agentType equals agenticAppInstance.

Why Microsoft Graph permissions still need close review

Microsoft says some high-risk Graph permissions are globally blocked for Entra Agent ID and cannot be granted to agent identities. The Microsoft Graph permissions overview explains that blocked delegated scopes or app roles are rejected when requested for agent identities.

Even with those controls, lower-risk permissions can still cause damage when misused. Mail.Send can support phishing or business email compromise, Mail.ReadWrite can expose sensitive mailbox content, and MailboxSettings.ReadWrite can support mailbox rule abuse.

Microsoft also provides Defender for Cloud Apps guidance for app governance detections, including suspicious OAuth apps sending numerous emails through Microsoft Graph. Those detections can help teams catch abuse patterns that involve mail permissions and unusual Graph API behavior.

Permission or behaviorPossible risk
Mail.SendOutbound phishing, fake invoices, or business email compromise attempts
Mail.ReadWriteMailbox access, message modification, or data theft
MailboxSettings.ReadWriteMailbox rule abuse, forwarding changes, or persistence attempts
Group.Read.AllReconnaissance of group membership and internal structure
Unexpected Graph sendMail callsPossible agent misuse or OAuth-based email abuse

How security teams can respond

Administrators can use Microsoft’s agent identity management guidance to view agent identities, manage agent blueprints, inspect permissions, and review sign-in logs in the Microsoft Entra admin center. Microsoft also supports retrieving agent sign-in events through Microsoft Graph.

When suspicious activity appears, security teams should confirm which identity actually performed the action, which user context was involved, which scopes were present, and whether the agent or blueprint has a legitimate business purpose.

Teams should also apply the same governance principles used for apps and service principals. That includes owners, sponsors, access reviews, conditional access, risk monitoring, and a clear process to disable or retire agents that no longer need access.

  • Inventory all agent identities and blueprints in the tenant.
  • Review users who granted access_agent consent.
  • Audit Graph permissions assigned to agent identities and blueprints.
  • Build detections for Graph sendMail calls from unusual agent identities.
  • Use OAuth app email alerts to investigate suspicious Graph-based email activity.
  • Apply the Microsoft Entra admin center guidance to disable risky agent identities when needed.
  • Review the Graph permission limits for agents before approving new delegated access.

The main lesson is clear: AI agent activity cannot be monitored like ordinary user activity alone. Defenders need to treat agent identities as part of the identity attack surface, correlate the right logs, and review delegated access before a helpful automation path becomes an abuse path.

FAQ

What are Microsoft Entra Agent ID logs?

Microsoft Entra Agent ID logs are audit and sign-in records that help administrators monitor activities involving agent identities, agent users, and agent-related traffic in Microsoft Entra ID.

What is an assistive agent in Microsoft Entra Agent ID?

An assistive agent is an interactive agent that performs tasks on behalf of a signed-in user. It uses delegated access, so its actions depend on both the agent’s permissions and the user’s permissions.

Which log fields can reveal an assistive agent on-behalf-of flow?

A useful pattern is Agent.agentType set to agenticAppInstance and Agent.agentSubjectType set to notAgentic in AADNonInteractiveUserSignInLogs. This can indicate an agent identity acting on behalf of a human user.

Why is Mail.Send risky for AI agents?

Mail.Send can let an agent send emails in a user’s context. If abused, it can support phishing, fake invoices, business email compromise, or unauthorized outbound messages.

How can defenders detect suspicious agent activity?

Defenders should correlate Microsoft Purview Exchange logs, Microsoft Graph Activity Logs, Entra non-interactive sign-in logs, and AuditLogs. They should also hunt for access_agent consent grants and unusual Graph sendMail activity.

Readers help support VPNCentral. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help VPNCentral sustain the editorial team Read more

User forum

0 messages