ai-security
AI Agent Identity: Don’t Borrow Your Organization’s Global Administrator Account
AI agent identity should be distinct, least-privileged, scoped to approved tools, and revocable instead of borrowing an administrator’s account.
AI Agent Identity: Don’t Borrow Your Organization’s Global Administrator Account
AI agent identity is becoming an infrastructure decision, not a prompt-writing detail. An agent that can call Microsoft Graph, Azure Resource Manager, Exchange, or an internal tool acts with some identity and permissions. If teams test it using a Global Administrator account or an all-powerful service principal, they make a demo work quickly while creating an unnecessarily large blast radius.
The safer question is not “Can the agent do everything?” It is “Which named operation does this agent need, against which approved scope, for how long, and how will we know what it did?” That question applies whether the agent runs in Azure, a SaaS product, a desktop app, or a developer’s workstation.
Separate the operator, agent, and workload identities
A human operator, an agent, and a workload are different security principals. A user-delegated flow can make a call on behalf of a signed-in person, subject to the consented permissions and the user’s own access. An application-only flow acts as the application and can have a different permission scope. Managed identity and workload identity federation can remove stored client secrets for supported hosting patterns, but they do not make permissions harmless. Code that can execute under an identity may be able to use that identity’s access.
Give each autonomous workload a distinct identity where the platform supports it. Avoid sharing one principal among agents with different jobs. Assign permissions to the smallest supported resource or API operation. Separate read from write capabilities and development from production. If a task needs a powerful role, make the exception explicit, time-bound where possible, and visible to the operator.
Treat chat history as context, never as authorization
Conversation memory can help interpret follow-up questions such as “show the same report for last month.” It should not grant a new tenant, subscription, mailbox, site, or permission. Resolve the customer and target from authenticated application state and an approved binding. Recheck membership and authorization for each tool invocation. A sentence in prior chat history is not a durable access grant.
The model can propose structured intent, but the application must validate it. Allow known operation identifiers and bounded filters, reject unrecognized fields, and build provider requests in code. Never turn arbitrary model text into PowerShell with Invoke-Expression, a shell command, a URI, or a permission assignment. If the requested operation is unsupported, return a safe explanation or ask a clarifying question rather than inventing a new command path.
Use a short and explicit permission design
For every tool, document its resource, identity, permission, data fields, and side effects. The table below is a design prompt, not a blanket permissions recipe:
An example least-privilege review record can answer these questions:
- Who requested it? The signed-in operator, verified by the application.
- Which identity calls the API? A task-specific delegated or workload identity.
- Which customer and target? A server-resolved approved tenant and resource scope.
- What is allowed? A named read operation with bounded filters.
- What is returned? Selected fields, capped rows, and redacted summaries.
- What changes? Nothing for this read-only tool.
The exact permission depends on the provider endpoint and whether it supports delegated or application access. Check its current documentation and consent requirements. Do not assume that a convenient SDK scope is least privilege. Review role assignments, app registrations, consent grants, managed identities, and credentials for principals that are no longer used.
Add controls around higher-impact actions
Identity is only one part of the boundary. Validate each tool call against a versioned catalog. Bind it to one selected customer and target. Limit row count, response bytes, execution time, and pagination. Require an explicit human review for consequential changes, with a preview that names the exact target and effect. Verify the result afterward and keep the approval, execution, and verification as separate audit events.
This article describes a design pattern, not a claim that every agent platform offers the same identity lifecycle. Azure agent identity features, managed identity support, and role assignment options vary by service, region, tenant configuration, and release status. Test your actual hosting environment. Keep a separate nonproduction environment and synthetic data for integration tests.
Make revocation part of the design
An identity that cannot be found or retired will accumulate access. Name principals so an owner can identify the service, link each identity to an accountable team, alert on unexpected privilege changes, and include cleanup in the deployment and incident process. When an agent is replaced or a project ends, remove its role assignments, revoke credentials or federation bindings, and confirm that its jobs stop. Do not reuse the identity just because it already has consent.
For high-impact operations, consider a separate approval identity and a separate execution identity. A person should review the intended operation using an authenticated channel; the model should not be able to approve its own plan. If the platform supports short-lived credentials or scoped tokens, use them with audience and resource restrictions appropriate to the API. These choices reduce exposure, but they do not replace operator review, monitoring, or correct application validation.
Microsoft’s AI agent shared-responsibility guidance discusses identity, permissions, memory, tool access, and human oversight. Its AI least-privilege guidance recommends distinct identities and scoped access patterns. Azure’s agent identity concepts explain one platform-specific approach; verify present availability and licensing before adopting it.
For pilot access details, read the page before requesting a connection: https://www.cloudekhosting.com/opspilot-pilot.html