# A self-hosted agent on Container Apps or AKS acts as a managed identity, and its network is open by default

Facts read 10 Nov 2026. Page reviewed 16 Nov 2026.

A container app can have a system-assigned managed identity (tied to the app) or user-assigned identities (standalone resources). Microsoft documents that for some resources you must configure role assignments for the app's managed identity, otherwise calls to services such as Key Vault and SQL Database are rejected even with a valid token.

A container app can have a system-assigned managed identity tied to the app, or user-assigned identities that are standalone resources. On AKS, Microsoft Entra Workload ID gives pods an Entra identity through a projected service account token. Microsoft documents that you must configure role assignments for the identity, or calls to services such as Key Vault and SQL Database are rejected. A default role grant: none found on 2026-11-10.

By default Container Apps is publicly accessible and can reach only internet-accessible endpoints; supplying your own virtual network adds control over outbound traffic. In AKS, all pods can send and receive traffic without limitations by default. Azure Policy, RBAC role assignments and Kubernetes network policy bound the agent. Container Apps send console and system logs to Log Analytics.

- **Status:** Self-hosted pattern, not a managed agent service.
- **The identity it runs as:** A container app can have a system-assigned managed identity (tied to the app) or user-assigned identities (standalone resources). On AKS, Microsoft Entra Workload ID uses a projected Kubernetes service account token and OIDC federation to give pods an Entra identity. ([source](https://learn.microsoft.com/en-us/azure/container-apps/managed-identity))
- **What it gets by default:** Microsoft documents that for some resources you must configure role assignments for the app's managed identity, otherwise calls to services such as Key Vault and SQL Database are rejected even with a valid token. A default role grant: none found on 2026-11-10. ([source](https://learn.microsoft.com/en-us/azure/container-apps/managed-identity))
- **Tools and actions:** Workloads on AKS need Entra application credentials or managed identities to reach Entra-protected resources such as Key Vault and Microsoft Graph; calls run as that identity. ([source](https://learn.microsoft.com/en-us/azure/aks/workload-identity-overview))
- **The agent's permissions or the user's:** The workload uses its own managed or workload identity. Propagation of an end user's permissions to the workload: none found on 2026-11-10 in the Container Apps and AKS pages read. ([source](https://learn.microsoft.com/en-us/azure/container-apps/managed-identity))
- **Network reachability:** By default Container Apps is publicly accessible and can communicate only with internet-accessible endpoints; supplying your own virtual network adds control over outbound traffic and access to private endpoints. In AKS, all pods can send and receive traffic without limitations by default. ([source](https://learn.microsoft.com/en-us/azure/container-apps/networking))
- **What is logged:** Container Apps send console logs (from your app) and system logs (from the service) to Log Analytics. For AKS, the Azure Monitor activity log collects some data automatically and control plane logs are resource logs sent through a diagnostic setting. ([source](https://learn.microsoft.com/en-us/azure/container-apps/log-monitoring))

## Boundaries that apply

- **Azure RBAC role assignments.** You use role-based access control to grant specific permissions to the managed identity. ([source](https://learn.microsoft.com/en-us/azure/container-apps/managed-identity))
- **Azure Policy.** Azure Policy enforces organizational standards and assesses compliance at scale. ([source](https://learn.microsoft.com/en-us/azure/governance/policy/overview))
- **Deny assignments.** A deny assignment attaches deny actions to a principal at a scope; Microsoft notes customer-managed deny assignments are in private preview. ([source](https://learn.microsoft.com/en-us/azure/role-based-access-control/deny-assignments))
- **Kubernetes network policy on AKS.** Network policies define rules for traffic between pods. ([source](https://learn.microsoft.com/en-us/azure/aks/use-network-policies))

## Checks to run for Azure

- [Give each agent its own role or service account, not a shared one](/checklist/own-identity-per-agent/): Use the per-agent Entra agent identity that Foundry creates, or a system-assigned managed identity that is tied to one container app.
- [Use short-lived role credentials and no long-lived access keys for the agent](/checklist/short-lived-credentials/): Use a managed identity; Microsoft documents that you do not manage its credentials.
- [Scope the role's trust to the specific agent, service account or workload](/checklist/scope-trust-to-the-agent/): Configure workload identity federation so one managed identity trusts one Kubernetes workload.
- [Write the agent's permission policy from what its tools actually call](/checklist/least-privilege-policy/): Grant the least privilege needed and avoid broader roles at broader scopes.
- [Set an organization-level ceiling the agent's role cannot exceed](/checklist/set-permission-ceiling/): Use deny assignments, which block listed actions even when a role assignment grants them (customer-managed deny assignments are documented as private preview), and apply governance conditions at management group scope.
- [Explicitly deny the agent IAM changes and destructive actions](/checklist/deny-iam-changes-and-destructive-actions/): Use deny assignments to block specific actions even if a role assignment grants them.
- [Compare the agent's granted permissions with what it used and remove the rest](/checklist/remove-unused-permissions/): Run recurring Microsoft Entra access reviews of role assignments.
- [Grant roles at the narrowest scope that works](/checklist/narrowest-scope/): Assign the role at resource or resource group scope instead of subscription or management group scope.

**Where Act is behind.** Act draws the boundary at the access layer (cloud IAM and network controls, and the gateways or MCP servers in front of agents); it does not inspect prompts or model outputs, which needs a different tool. Your team applies the boundaries it proposes, and its customer evidence for AI boundaries is less mature than for its core access control.

## Related pages

- [Amazon Bedrock Agents (now Amazon Bedrock Agents Classic): identity, permissions and boundaries](/agent-platforms/bedrock-agents/)
- [Amazon Bedrock AgentCore (Runtime, Gateway, Identity): identity, permissions and boundaries](/agent-platforms/bedrock-agentcore/)
- [Agent Runtime on Gemini Enterprise Agent Platform (formerly Vertex AI Agent Engine, Agent Builder): identity, permissions and boundaries](/agent-platforms/agent-runtime-gcp/)

## Sources

- learn.microsoft.com/en-us/azure/container-apps/managed-identity: https://learn.microsoft.com/en-us/azure/container-apps/managed-identity (read 10 Nov 2026)
- learn.microsoft.com/en-us/azure/aks/workload-identity-overview: https://learn.microsoft.com/en-us/azure/aks/workload-identity-overview (read 10 Nov 2026)
- learn.microsoft.com/en-us/azure/container-apps/networking: https://learn.microsoft.com/en-us/azure/container-apps/networking (read 10 Nov 2026)
- learn.microsoft.com/en-us/azure/aks/use-network-policies: https://learn.microsoft.com/en-us/azure/aks/use-network-policies (read 10 Nov 2026)
- learn.microsoft.com/en-us/azure/container-apps/log-monitoring: https://learn.microsoft.com/en-us/azure/container-apps/log-monitoring (read 10 Nov 2026)
- learn.microsoft.com/en-us/azure/aks/monitor-aks: https://learn.microsoft.com/en-us/azure/aks/monitor-aks (read 10 Nov 2026)
- learn.microsoft.com/en-us/azure/governance/policy/overview: https://learn.microsoft.com/en-us/azure/governance/policy/overview (read 10 Nov 2026)
- learn.microsoft.com/en-us/azure/role-based-access-control/deny-assignments: https://learn.microsoft.com/en-us/azure/role-based-access-control/deny-assignments (read 10 Nov 2026)

Last reviewed 16 Nov 2026. Canonical: https://aiagentaccesscontrol.com/agent-platforms/self-hosted-azure/
