Preventing OWASP ASI05 Unexpected Code Execution in a .NET AI agent with input validation, non-root containers, static tool registration, and runtime monitoring.

Preventing Unexpected Code Execution in AI Agents

Can your AI Agent run code? If not, you probably don’t think that unexpected code execution applies to you. However, this goes a lot deeper than eval(). Input validation, container security, static analysis, and runtime monitoring all play a part here. Even an Agent with read-only capabilities and no code interpreter has an execution environment, tool parameters that flow from LLM output, and a CI/CD pipeline that needs to be secure. ...

March 11, 2026 · 16 min · Will Velida
Building a health data chat agent using Claude as the LLM backend with the Microsoft Agent Framework in .NET 10, featuring function tools, AG-UI streaming, and system prompt design.

Building a Health Data Chat Agent with Claude and the Microsoft Agent Framework

Using the Microsoft Agent Framework, we can build agents that interact with our data via chat capabilities. In my personal project, I decided to create a Chat API that allows me to query my data via a chat interface using an LLM. I wasn’t keen on using OpenAI, or even provisioning Microsoft Foundry to create a deployment so that I could use an LLM that they provide. I decided to just grab an API key for Anthropic so that I could use Claude, and hook it up into my agent so I wouldn’t have to worry about managing any Foundry infrastructure. ...

March 10, 2026 · 14 min · Will Velida
Learn how to give AI agents their own discrete, auditable identities using Microsoft Entra Agent ID, enabling them to authenticate to Azure services like Cosmos DB and Blob Storage with scoped RBAC permissions via the .NET Azure SDK.

How to Call Azure Services from an AI Agent Using Entra Agent ID and the .NET Azure SDK

Introduction: The Identity Problem with AI Agents AI agents are moving beyond simple prompt-and-response. They’re calling APIs, reading databases, writing to storage etc. Doing actions on real resources with real consequences. This raises a question every platform team eventually asks: whose identity should the agent use? Today, most agents authenticate to Azure services one of two ways: Delegated (on-behalf-of-user): The agent acts as the signed-in user. This can work for interactive scenarios, but it means the agent inherits all of the user’s permissions. Which far more than a narrowly-scoped tool call should need. It also falls apart for background or autonomous agents that run without a user session. App-only (managed identity or client credentials): The agent authenticates as the hosting application. This solves the “no user present” problem, but now every agent running on the same compute shares a single identity. You can’t distinguish which agent accessed which resource in your logs. You can’t give one agent read-only access to Cosmos DB while another gets read-write. The agent is the app, as far as Azure is concerned. Neither option gives you what you actually want: a discrete, auditable identity for the agent itself. One that’s separate from the user, separate from the hosting infrastructure, and scoped to exactly the permissions the agent needs. ...

March 2, 2026 · 28 min · Will Velida
Learn how to create agent identity blueprints using Microsoft Graph PowerShell and provision agent identities through an ASP.NET Web API running on Azure Container Apps, with managed identity authentication and federated credentials.

Creating Entra Agent ID Blueprints and Identities with PowerShell and .NET

In Microsoft Entra Agent ID, we use agent identity blueprints to create agent identities and request tokens using those agent identities. These agent identities represent AI Agents within your tenant, and is usually provisioned when we create a new AI Agent. In this post, we’ll go through an end-to-end example of creating an agent blueprint using Microsoft Graph PowerShell, then we’ll create an Agent Identity using a ASP.NET Web API that we’ll deploy to Azure Container Apps. ...

February 28, 2026 · 17 min · Will Velida
As agents become more capable of making decisions, they require own identities to ensure proper governance, security, and accountability. Microsoft Entra Agent ID extends identity capabilities to agents, which help developers to build, govern, and protect agent identities.

Understanding Microsoft Entra Agent ID

As agents become more capable of making decisions, they require own identities to ensure proper governance, security, and accountability. AI Agents are already being used in a variety of different workflows (perhaps you’ve deployed some yourself!). But as they become more capable and make autonomous decisions, there are several concerns and challenges that must be addressed: How do we authenticate and authorize agents? How do we govern them? Probably most important of all, how do we distinguish them from humans?! Microsoft Entra Agent ID extends identity capabilities to agents, which help developers to build, govern, and protect agent identities. In this article, we’re going to explore how Entra Agent ID gives agents security capabilities, such as control access policies, identity protection, and more. ...

February 27, 2026 · 8 min · Will Velida