{"id":"TIE-AGT-012","title":"Discover and inventory every AI agent, including shadow AI","maturity":"documented","collection":"Agent identity","category":"Discovery and inventory","complexity":"Medium","intent":"Find every AI agent that can act in your environment, whether built, bought or brought in by employees, and keep one living inventory that records who owns it, what it is for, how it authenticates and what it can reach.","summary":"You cannot govern agents you cannot see. This pattern feeds several discovery sources into one reconciled inventory, gives every agent a human owner, and turns each new discovery into a decision: register, onboard, contain or retire.","problems":["Shadow AI and agent sprawl","Unowned AI agents","OAuth consent sprawl","Agents using human or shared credentials","Audit evidence for AI governance","Orphaned agents after people leave"],"standards":["OWASP Top 10 for Agentic Applications 2026 (ASI03 Identity and Privilege Abuse","ASI04 Agentic Supply Chain)","OWASP Non-Human Identities Top 10","NIST AI Risk Management Framework 1.0 (Map function)","ISO/IEC 42001 (AI system inventory)"],"tags":["shadow AI","agent discovery","agent inventory","agent registry","ISPM","identity security posture management","OAuth grants","consent","MCP servers","browser extension","endpoint agents","non-human identity","NHI","sprawl"],"roles":["IAM architect","Identity engineer","Security leader","Platform engineering","AI engineering"],"industries":["Cross-industry","Financial services","Healthcare","Retail","Public sector"],"builds_on":["TIE-AGT-001"],"related":["TIE-AGT-013","TIE-AGT-017"],"authors":"Trevonix Innovation","reviewers":"Trevonix IAM architecture","version":"1.0","last_reviewed":"2026-11-24","published":"2026-11-24","og_image":"og-tie-agt-012.png","sections":{"summary":[{"type":"bullets","content":"Discovery is **continuous and multi-source**: the identity provider, agent-builder platforms, SaaS consent grants, browsers and endpoints, network egress, code and cloud. No single source sees every agent.\nAll sources feed **one inventory**, reconciled on the credential or client the agent uses, not on its display name.\nEvery discovered agent gets a **human owner and a decision** (register, onboard, contain or retire) within a set time. Nothing stays anonymous."}],"problem":[{"type":"paragraph","content":"AI agents now arrive through many doors. Teams build them on agent platforms, vendors ship them inside SaaS products, developers run coding agents and local MCP servers on their laptops, and employees connect personal assistants to work data with a few consent clicks. Each of these leaves a trace somewhere different: an agent identity in the directory, an OAuth grant in a SaaS tenant, an extension in a browser, a process on an endpoint, an API key in a repository.\n\nMost organisations therefore have a partial list at best, usually the agents the platform team built on purpose. The agents that carry the most risk are the ones on nobody's list: created by someone who has since left, running on a shared service account or a personal API key, with broad scopes granted once and never reviewed."},{"type":"note","content":"Every other agent control (sponsorship, least privilege, approval gates, access reviews, a kill switch) assumes you know the agent exists. Discovery is the first control, not a one-off audit.","title":"Why this matters"}],"use_when":[{"type":"bullets","content":"You are starting an AI governance programme and need a baseline of what exists.\nEmployees can connect AI tools to corporate data through OAuth consent, browser extensions or local tools.\nMore than one team or platform builds or buys agents.\nAuditors, regulators or the board ask how many agents you run and who is accountable for them."}],"avoid_when":[{"type":"bullets","content":"You only need the list of agents one platform team built. Use that platform's registry, but plan for the others.\nYou cannot act on what you find. Agree the owner and triage process first, or discovery just produces an alarming spreadsheet."}],"forces":[{"type":"bullets","content":"**Coverage against intrusion.** Browser and endpoint discovery sees the most shadow AI, and needs employee-privacy, works council or HR agreement in many countries.\n**Speed against accuracy.** Raw discovery feeds are noisy; reconciling them takes effort, but an unreconciled list double-counts and misses ownership.\n**Enablement against control.** Blocking everything you find pushes people to tools you cannot see; ignoring it leaves data exposed.\n**One registry against many.** Every agent platform has its own inventory; the enterprise needs one view across them."}],"solution":[{"type":"paragraph","content":"Treat agent discovery like asset discovery: several **collectors** feed a **reconciler**, which writes to **one inventory** that other controls read. Each collector looks at a different footprint an agent leaves. The reconciler matches records on the credential, client ID or service principal the agent uses, so the same agent seen in three places becomes one record. Every new record starts a **triage** with a deadline: the owner is found, the agent is classified and a decision is taken."},{"type":"image","content":"Several discovery sources feed one reconciled inventory; every new agent gets an owner and a triage decision.","title":"Solution overview","media":"tie-agt-012-solution.png","alt":"Diagram. On the left, six discovery sources: identity provider (agent identities, service principals, OAuth apps), agent platforms (Copilot Studio, Foundry, Agentforce, Bedrock, Vertex), SaaS consent grants, browsers and endpoints (extensions, local agents, MCP servers), network and CASB egress to A"},{"type":"table","content":"Source | What it finds | Typical blind spot\nIdentity provider | Agent identities, service principals, app registrations, OAuth clients, consent grants | Agents that use a personal API key or a human's credentials\nAgent platforms | Agents built in Copilot Studio, Foundry, Agentforce, Bedrock, Vertex AI and similar | Agents built anywhere else\nSaaS consent grants | Third-party AI tools that users connected to Microsoft 365, Google Workspace, Salesforce and others | Tools that use pasted API keys instead of OAuth\nBrowser and endpoint | AI extensions, coding agents, local MCP servers, desktop assistants | Unmanaged devices\nNetwork and CASB | Traffic to model providers and AI SaaS, by user and device | Encrypted or personal-device traffic\nCode, CI and cloud | Model-provider API keys, MCP configuration files, workload identities with model access | Repositories and accounts you do not scan","title":"Discovery sources"},{"type":"table","content":"Field | Why it matters\nAgent ID and name | One stable key across sources\nPlatform and runtime | Where it runs; who can change it\nOwner and sponsor | The accountable human (see TIE-AGT-001)\nPurpose | What it is for; drives least privilege and reviews\nHow it authenticates | Its own identity, a shared account, a human's credential, an API key\nReach | Scopes, connections, MCP servers, data classes and systems it can touch\nWho can instruct it | Internal users, customers, other agents, external content\nAutonomy | Suggests, acts with approval, or acts alone\nRisk tier | Drives the control baseline (see TIE-AGT-013)\nStatus, first seen, last active | Lifecycle and orphan detection\nSanctioned? | Approved for use, tolerated, or prohibited","title":"Minimum inventory record"},{"type":"numbered","content":"**Collect.** Turn on each discovery source that applies to you, starting with the identity provider and your main agent platforms, then SaaS consent grants, then browsers, endpoints and code.\n**Reconcile.** Match records on client ID, service principal, credential fingerprint or OAuth grant. Merge duplicates; keep every source that saw the agent.\n**Attribute.** Find the human owner from the creator, the consenting user, the repository owner or the device user. Unattributed agents go to a named queue with a deadline.\n**Triage.** Decide: *register* sanctioned agents, *onboard* useful unmanaged ones (own identity, sponsor, least privilege), *contain* risky ones (revoke the grant or block first, then talk to the owner) and *retire* unused or orphaned ones.\n**Publish.** Make the inventory readable by other controls: risk tiering, conditional access, the policy decision point, access reviews and the kill switch.\n**Repeat.** Run collectors continuously or at least weekly, and track coverage and time to triage.","title":"How it works"},{"type":"tip","content":"Shadow AI is often a signal of unmet need. When triage finds many people using the same unsanctioned tool, offer a sanctioned route to the same capability before you block it.","title":"Contain the risk, not the people"}],"design_rules":[{"type":"numbered","content":"**Discovery is continuous.** A one-off survey is out of date within weeks.\n**One inventory, many sources.** Agent platforms keep their own lists; the enterprise inventory reconciles them.\n**Reconcile on credentials, not names.** Names change and collide; client IDs, service principals and key fingerprints do not.\n**No anonymous agents.** Every agent has a human owner within a set number of days, or it is contained.\n**Consent grants count as agents.** An AI tool a user connected with broad scopes is an agent acting on your data.\n**Include MCP servers and tools.** They extend what every agent that uses them can reach.\n**Contain before you investigate** when an agent has high reach and no owner.\n**Measure coverage.** Track which sources are on, how many agents are unowned, and how long triage takes."}],"anti_patterns":[{"type":"table","content":"Anti-pattern | What goes wrong\nAnnual survey spreadsheet | Out of date immediately; misses everything nobody declares\nInventory equals one platform's registry | Agents on other platforms, in SaaS and on laptops are invisible\nMatching on display name | Duplicates and misses; renamed agents disappear\nDelete everything found | People move to tools and devices you cannot see\nDiscovery with no owner process | A growing list of known risks with nobody accountable\nIgnoring consent grants | Third-party AI tools keep standing access to mail, files and CRM data"}],"benefits":[{"type":"bullets","content":"A defensible answer to \"how many agents do we run, and who owns them?\"\nShadow AI and orphaned agents found before they cause an incident.\nThe foundation for risk tiering, access reviews and the kill switch.\nEvidence for AI governance frameworks that require an AI system inventory."}],"costs":[{"type":"bullets","content":"Licensing or build effort for several discovery sources.\nPrivacy and employee-relations work for browser and endpoint discovery.\nAn operating process for triage and owner chasing.\nOngoing tuning to cut noise from benign tools and duplicate records."}],"tests":[{"type":"table","content":"Test | Expected result\nCreate a test agent on a sanctioned platform | Appears in the inventory with its owner within the agreed time\nGrant a test AI app broad OAuth scopes as a normal user | Discovered as an agent with the consenting user as provisional owner\nInstall a test AI browser extension or local MCP server on a managed device | Discovered and attributed to the device user\nCommit a dummy model-provider key to a scanned repository | Raised as an unregistered agent credential\nThe same agent seen by two sources | One inventory record, two sources listed\nOwner leaves the organisation | Agent flagged for reassignment or retirement\nUnowned high-reach agent past its deadline | Contained (grant revoked or agent disabled) and logged"}],"maturity_notes":[{"type":"paragraph","content":"**Documented.** This pattern is written from vendor documentation and Trevonix's discovery method; Trevonix has registered and governed agent identities in Microsoft Entra, Okta and Ping lab tenants (November 2026), but has not yet lab-tested the shadow AI discovery sources described here end to end."},{"type":"warning","content":"Agent discovery features are new and several are in early access or preview, with licensing that varies by edition. Check each recipe against your vendor's current documentation before you plan the rollout.","title":"Fast-moving products"}],"faq":[{"type":"faq","content":"Start with the identity provider (agent identities, service principals and OAuth consent grants) and the agent platforms you already license. They are cheap to turn on and find most sanctioned agents. Add browser, endpoint and code discovery next to find shadow AI.","title":"Where should we start?"},{"type":"faq","content":"No. Contain the ones with high reach and no owner, onboard the useful ones properly, and retire the unused ones. Blocking everything pushes people to tools you cannot see.","title":"Should we block every unsanctioned agent we find?"},{"type":"faq","content":"Yes, if it acts on your data. A third-party AI tool that a user connected with read and write access to their mailbox can act on that data without the user present. Record it, find its owner and review its scopes.","title":"Is an OAuth consent grant really an agent?"},{"type":"faq","content":"Match on what the agent uses to authenticate: its client ID, service principal, OAuth grant or a fingerprint of its key. Keep the display name as a label only.","title":"How do we avoid counting the same agent twice?"}],"references":[{"type":"bullets","content":"[Okta Help: AI agent discovery](https://help.okta.com/oie/en-us/content/topics/ai-agents/ai-agent-inventory.htm)\n[Microsoft Learn: Agent registry convergence with Microsoft Agent 365](https://learn.microsoft.com/en-us/entra/agent-id/agent-registry-convergence)\n[PingOne Privilege: Discover and manage AI platform agents](https://docs.pingidentity.com/privilege/agent-privilege/use-cases/ai-platform-agents.html)\n[Saviynt: Identity Security for AI](https://saviynt.com/products/identity-security-for-ai)\n[OWASP GenAI Security Project: Top 10 for Agentic Applications](https://genai.owasp.org/2025/12/09/owasp-top-10-for-agentic-applications-the-benchmark-for-agentic-security-in-the-age-of-autonomous-ai/)"}]},"recipes":{"ping":{"status":"documented","product_name":"PingOne Privilege AI discovery, PingOne Protect and Advanced Identity Cloud Agent Governance","summary":"PingOne Privilege discovers and risk-scores agents on AI platforms; PingOne Protect detects agents at runtime; the Agent Governance add-on imports agents for governance. Written from Ping documentation; not lab-tested by Trevonix.","last_verified":"2026-11","blocks":[{"type":"table","content":"Component | Role in this pattern\nPingOne Privilege, AI discovery | Finds agents on connected AI platforms, inventories them and scores each one for risk\nPingOne Protect, agent detection | Detects AI agents acting in user sessions at runtime\nPingOne Advanced Identity Cloud, Agent Governance add-on | Imports agent identities from AI platforms through reconciliation so they can be governed","title":"Components"},{"type":"numbered","content":"In PingOne Privilege, add the platform applications for the AI platforms you use, then review discovered agents under **AI Security > AI Platform Agents**. Each agent has a risk score built from findings such as excessive permissions, missing owners or no monitoring.\nIf you run Advanced Identity Cloud with Identity Governance and the Agent Governance add-on, add a custom property such as `custom_iga_identity_type` to mark identities as agents, then onboard each AI platform with provisioning, property mappings, correlation and reconciliation.\nUse PingOne Protect agent detection to spot agents acting inside user sessions on your web applications.\nFeed the results into your inventory and assign owners.","title":"Configure"}]},"okta":{"status":"documented","product_name":"Okta Identity Security Posture Management with Okta for AI Agents","summary":"ISPM discovers agents, OAuth grants, shadow AI apps and MCP servers from integrations, the browser plugin and endpoint connectors; Okta for AI Agents registers them with an owner. Written from Okta documentation; not yet lab-tested by Trevonix.","last_verified":"2026-11","blocks":[{"type":"table","content":"Component | Role in this pattern\nIdentity Security Posture Management (ISPM) | Discovers AI agents, OAuth grants, shadow AI apps and MCP servers, with an AI agent risk category\nSecure Access Monitor browser plugin | Sees OAuth grants and shadow AI apps used in managed browsers\nEndpoint integration | Inventories locally running agents and MCP servers through an endpoint detection connector (early access)\nOkta for AI Agents (Universal Directory) | Registers discovered agents as managed identities with a human owner","title":"Components"},{"type":"numbered","content":"In ISPM, connect the sources you have: your Okta org, the SaaS and agent platforms ISPM integrates with (for example Microsoft Copilot Studio and Salesforce Agentforce), the Secure Access Monitor plugin for managed Chrome browsers, and the endpoint connector if you are in its early access.\nReview the AI agent pages in the ISPM console: each discovered agent shows its owner, what it can access and the resources it can affect.\nWork the AI agent risk findings, starting with agents that have broad grants and no owner.\nFor each agent you keep, register it in **Directory > AI agents** in the Admin Console, assign a human owner, and replace its grant or key with a managed connection.","title":"Configure"},{"type":"bullets","content":"Browser discovery only sees managed browsers with the plugin deployed; plan the browser rollout with your endpoint team early.","title":"Gotchas"}]},"entra":{"status":"documented","product_name":"Microsoft Agent 365 and Microsoft Entra Agent ID","summary":"Agent 365 provides the unified agent registry and Entra Agent ID the agent identities, owners and sponsors; enterprise application grants and Defender for Cloud Apps cover third-party and shadow AI. Written from Microsoft documentation; not yet lab-tested by Trevonix for discovery.","last_verified":"2026-11","blocks":[{"type":"table","content":"Component | Role in this pattern\nMicrosoft Agent 365 registry | The unified inventory of Microsoft and non-Microsoft agents, viewed in the Microsoft 365 admin center\nMicrosoft Entra Agent ID | Agent identities and blueprints, with owners and sponsors, in the Entra admin center\nEnterprise applications and consent grants | Service principals and delegated OAuth grants that third-party AI tools hold\nMicrosoft Defender for Cloud Apps | Cloud discovery of generative AI apps used from your network and devices","title":"Components"},{"type":"numbered","content":"Give the people who run discovery the **AI Reader** role, which lets them see agents in Agent 365 and Entra Agent ID without changing anything.\nIn the Microsoft 365 admin center, open the Agent 365 registry and export the agent list. Microsoft-built and Copilot Studio agents register automatically; register other agent identity blueprints so they appear too.\nIn the Entra admin center, browse to **Entra ID > Agents > Agent identities** and **Agent blueprints**, and record each agent's owners, sponsors, status and granted permissions.\nUnder **Enterprise applications**, review delegated permission grants and application permissions held by AI tools; filter on publisher and on high-impact scopes such as mail, files and directory access.\nIn Defender for Cloud Apps, review discovered generative AI apps and the users and devices that use them.\nReconcile the four lists on application ID and service principal ID into your inventory.","title":"Configure"},{"type":"bullets","content":"Agent registry experiences are converging under Agent 365, and the earlier Entra Agent Registry Graph APIs are being replaced; check which APIs your scripts call.\nApplying Conditional Access or governance to agents needs the right Agent ID licensing, even though seeing them does not.","title":"Gotchas"}]},"saviynt":{"status":"documented","product_name":"Saviynt Identity Security for AI","summary":"Saviynt's posture management for AI discovers authorised and unauthorised agents and surfaces over-privileged access; lifecycle management registers each agent with an owner and successor. Written from Saviynt's published material; not lab-tested by Trevonix.","last_verified":"2026-11","blocks":[{"type":"table","content":"Capability | Role in this pattern\nIdentity Security Posture Management for AI | Continuous discovery of authorised and unauthorised agents, with risk and over-privilege findings\nIdentity lifecycle management | Registers each agent with a purpose, scope and owner, including a succession plan","title":"Capabilities used"},{"type":"numbered","content":"Connect the agent platforms, cloud accounts and SaaS applications in scope to Saviynt's posture management for AI.\nReview discovered agents and their risk findings; prioritise unowned agents with excessive access.\nRegister the agents you keep, with an owner, a successor and an approved purpose, so lifecycle governance applies from then on.","title":"Configure"}]},"misc":{"status":"documented","product_name":"CASB, secret scanning and cloud inventory","summary":"Generic sources that find agents outside the identity platforms: AI traffic in your secure web gateway or CASB, model-provider keys in code, and cloud workload identities with model access.","last_verified":"2026-11","blocks":[{"type":"paragraph","content":"Whatever your identity platform, three generic sources close most remaining gaps: your secure web gateway or CASB for traffic to AI services, secret scanning in source control for model-provider API keys and MCP configuration files, and your cloud provider's inventory of workload identities that can call model endpoints."},{"type":"numbered","content":"Enable the generative AI category in your CASB or secure web gateway reports and export users and devices per AI service.\nAdd model-provider key patterns and MCP configuration file names to your secret scanning rules.\nList cloud workload identities with permission to invoke model endpoints (for example Amazon Bedrock, Azure OpenAI or Vertex AI).\nFeed all three into the same inventory and reconciliation process.","title":"Configure"}]}},"slug":"tie-agt-012-discover-and-inventory-every-ai-agent-including-shadow-ai","updated_at":"2026-11-24T17:50:30.268Z","url":"https://exchange.trevonix.com/patterns/tie-agt-012-discover-and-inventory-every-ai-agent-including-shadow-ai","markdown_url":"https://exchange.trevonix.com/patterns/tie-agt-012-discover-and-inventory-every-ai-agent-including-shadow-ai.md","publisher":"Trevonix","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"}}