AIAgent
AI Agent Principal Inventory Discovery (Copilot / Power Platform / Teams /
What it does
Enumerates Entra ID service principals via Microsoft Graph and classifies the non-human AI-agent principals into one of six AgentClass values per SPEC-122 section 3. Writes AIAgentInventory.csv (+ .json) with 18 columns including audit signals (AC3) and per-agent SharePoint / Mailbox / OneDrive exposure scope (AC4). Non-agent principals are excluded from the output. v1.1.0 (APEX-RFC-20260704-ENTRA-CAP-AGENT-001 / gap #29 CAP-side): Adds agent.identity.csa.attributes populated from the Graph agentIdentity resource preview (Entra June 2026). Null-safe — tenants without the agentIdentity preview still get a clean row with csa.attributes = ''. v1.2.0 (ACQI-DISC-AI-AGENT-001, gap filed 2026-07-12 / kanban t_e1428838): Closes the remaining two acceptance criteria on top of v1.1.0: AC3: Ingest Unified Audit Log entries where RecordType matches agent patterns OR the operation originates from a non-interactive AppId of one of the discovered agents. Populates AuditSignals7d (count of signIn+directoryAudit hits in last 7d) and LastActivityUtc per row. AC4: Per-agent data exposure scope — share which SharePoint sites / mailboxes / OneDrive folders each agent can read or write, surfaced distinctly from human exposure. Populates MailboxScope, SharePointScope, OneDriveScope, and AgentCapabilitiesSummary on every row. Single-canonical-reader discipline (AC5 / gap-map invariant): for the scope of *AI-agent classification*, AIAgentDiscovery.psm1 is the only Graph path that filters ServicePrincipals by the AI/AINative tag → AgentClass mapping. Other modules that call Get-MgServicePrincipal (ApplicationDiscoveryV2, EntraIDSecurityDiscovery, MigrationPreFlightValidation, CloudSecurityGroupSoftDeleteDiscovery) classify SPNs by their own criteria (general app inventory, security surface, migration readiness, soft-delete detection) — those are distinct read paths with distinct selectors and distinct output schemas. The UAL reader, the /sites reader, and the oauth2PermissionGrants reader below are also unique to this module. Audit proof: see agent-session evidence (grep -rn Get-MgServicePrincipal Modules/ shows the full set of consumers; AIAgentDiscovery.psm1 is the ONLY one whose selector combines 'Tags contains Agent/AINative' with Publisher/DisplayName name-pattern matches that target Copilot/Teams/ Power Platform/SharePoint tenants). The extended M365 shared-responsibility model classifies AI agent governance as a customer-side responsibility; this inventory is the Day-1 readiness artifact for AI-adopting tenants.
How the app exposes it
The module runs through the ACQI discovery orchestrator and writes its rows into a dedicated results view. From there, conflicts, dependencies, and readiness scores feed the deal-wide consolidation layer.
/discovered/ai-agents Outputs
Each module emits a normalised CSV keyed by entity ID with readiness and risk scores, evidence-source counts, and last-seen timestamps. The exact column set varies by module — the app's results view shows the live schema.